namespace QMVnSoft.Invoices
{
    using QMVnSoft;
    using QMVnSoft.Controls;
    using QMVnSoft.Controls.ChildGridControls;
    using QMVnSoft.Properties;
    using QMVnSoft.DAL;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class FormVATInput : FormControl
    {
        private ToolStripButton btnAdd;
        private ToolStripButton btnCancel;
        private ToolStripButton btnClose;
        private ToolStripButton btnDelete;
        private ToolStripButton btnEdit;
        private ToolStripDropDownButton btnFunctions;
        private ToolStripButton btnHistory;
        private ToolStripMenuItem btnLock;
        private ToolStripButton btnRefresh;
        private ToolStripButton btnSave;
        private ToolStripMenuItem btnUnLock;
        private DataGridViewTextBoxColumn Column1;
        private DataGridViewTextBoxColumn Column2;
        private DataGridViewTextBoxColumn Column3;
        private DataGridViewTextBoxColumn Column4;
        private NumericColumn Column5;
        private NumericColumn Column6;
        private StatusColumn Column7;
        private IContainer components;
        private GBoxControl gBoxControl1;
        private GBoxControl gBoxControl2;
        private GBoxControl gBoxControl3;
        private GridControl gridControl;
        private bool ib_NewChecked;
        private object id_Ngay_Ct;
        private object id_Ngay_Ct0;
        private int ii_Posted;
        private decimal ii_Thue_Suat;
        private decimal ii_TTien;
        private decimal ii_TTien_VAT0;
        private decimal ii_TTien_VAT1;
        private decimal ii_TTien1;
        private string is_ActiveTransaction;
        private object is_Dien_Giai;
        private object is_Ma_Dt;
        private object is_Ma_DtGTGT;
        private string is_MasterInvoiceOrder;
        private object is_No_Co;
        private string is_SavedInvoiceOrder;
        private object is_So_Ct;
        private object is_So_Ct0;
        private object is_So_Seri0;
        private object is_Ten_DtGTGT;
        private object is_Thue_XNK;
        private object is_Tk;
        private object is_Tk_Du;
        private string is_VATInvoiceOrder;
        private LabelControl lblDien_Giai;
        private LabelControl lblDieu_Chinh;
        private LabelControl lblDieu_Chinh0;
        private LabelControl lblGhi_Chu;
        private LabelControl lblHang_NLTS;
        private LabelControl lblHoa_Don;
        private LabelControl lblLoai_VAT;
        private LabelControl lblLoai_VAT0;
        private LabelControl lblMa_Dt;
        private LabelControl lblMa_DtGTGT;
        private LabelControl lblMa_Sp;
        private LabelControl lblNgay_Ct;
        private LabelControl lblNgay_Ct0;
        private LabelControl lblSo_Ct0;
        private LabelControl lblSo_Seri0;
        private LabelControl lblTen_DtGTGT;
        private LabelControl lblThue_GTGT;
        private LabelControl lblThue_XNK;
        private LabelControl lblTien;
        private LabelControl lblTien3;
        private LabelControl lblTk;
        private LabelControl lblTk_Du;
        private LabelControl lblTSCD_Ck;
        private LabelControl lblTTien_VAT0;
        private LabelControl lblTTien_VAT1;
        private DataTable oCanNotDelete;
        private DataRow oCurrentRow;
        private AppInvoiceLib oAppInvoiceLib;
        private CTVATDataAccess oMethod;
        private DataTable oTable;
        private ToolStripButton oVATToolbarButton;
        private SplitContainer splitContainer1;
        private ToolStripSeparator tbrSep01;
        private ToolStripSeparator tbrSep02;
        private ToolStripSeparator tbrSep03;
        private ToolStripSeparator tbrSep04;
        private ToolStripSeparator tbrSep05;
        private ToolStripSeparator tbrSep06;
        private ToolStripSeparator tbrSep07;
        private ToolStrip Toolbars;
        private TextControl txtDien_Giai;
        private TextOption txtDieu_Chinh;
        private TextControl txtGhi_Chu;
        private TextOption txtHang_NLTS;
        private TextOption txtHoa_Don;
        private TextOption txtLoai_VAT;
        private TextControl txtLocked;
        private TextSearch txtMa_Dt;
        private TextControl txtMa_DtGTGT;
        private TextSearch txtMa_Sp;
        private TextDate txtNgay_Ct;
        private TextDate txtNgay_Ct0;
        private TextOption txtNo_Co;
        private TextControl txtSo_Ct0;
        private TextControl txtSo_Seri0;
        private TextControl txtTen_Dt;
        private TextControl txtTen_DtGTGT;
        private TextControl txtTen_Sp;
        private TextControl txtTen_Tk;
        private TextControl txtTen_Tk_Du;
        private TextNumeric txtThue_GTGT;
        private TextOption txtThue_XNK;
        private TextNumeric txtTien;
        private TextNumeric txtTien3;
        private TextSearch txtTk;
        private TextSearch txtTk_Du;
        private TextOption txtTSCD_Ck;
        private TextNumeric txtTTien_VAT0;
        private TextNumeric txtTTien_VAT1;
        private TextControl txtUserName;
        private TextOption txtVAT_Ck;

        public FormVATInput(string ps_ActiveTransaction)
        {
            this.oMethod = new CTVATDataAccess();
            this.is_ActiveTransaction = "";
            this.ii_Posted = -1;
            this.id_Ngay_Ct = DBNull.Value;
            this.is_So_Ct = DBNull.Value;
            this.id_Ngay_Ct0 = DBNull.Value;
            this.is_So_Ct0 = DBNull.Value;
            this.is_So_Seri0 = DBNull.Value;
            this.is_Tk = DBNull.Value;
            this.is_Tk_Du = DBNull.Value;
            this.is_No_Co = DBNull.Value;
            this.is_Ma_Dt = DBNull.Value;
            this.is_Ten_DtGTGT = DBNull.Value;
            this.is_Ma_DtGTGT = DBNull.Value;
            this.is_Dien_Giai = DBNull.Value;
            this.is_Thue_XNK = DBNull.Value;
            this.InitializeComponent();
            this.gridControl.AutoGenerateColumns = false;
            this.ActiveTransaction = ps_ActiveTransaction;
            this.InvoiceCode = "PVAT";
            if (ps_ActiveTransaction == "2")
            {
                this.Tk = AppInstance.Account1331;
                this.No_Co = "N";
            }
            else
            {
                this.Tk = AppInstance.Account33311;
                this.No_Co = "C";
            }
            this.OnRefresh();
        }

        public FormVATInput(AppInvoiceLib po_AppInvoiceLib, string ps_MasterInvoiceOrder, int pi_MasterPosted, object pd_Ngay_Ct, object ps_So_Ct, object pd_Ngay_Ct0, object ps_So_Ct0, object ps_So_Seri0, object ps_Tk, object ps_Tk_Du, object ps_No_Co, object ps_Ma_Dt, object ps_Ten_DtGTGT, object ps_Ma_DtGTGT, object ps_Dien_Giai, decimal pi_TTien, decimal pi_Thue_Suat, decimal pi_TTien_VAT0, decimal pi_TTien_VAT1, object ps_Thue_XNK)
        {
            this.oMethod = new CTVATDataAccess();
            this.is_ActiveTransaction = "";
            this.ii_Posted = -1;
            this.id_Ngay_Ct = DBNull.Value;
            this.is_So_Ct = DBNull.Value;
            this.id_Ngay_Ct0 = DBNull.Value;
            this.is_So_Ct0 = DBNull.Value;
            this.is_So_Seri0 = DBNull.Value;
            this.is_Tk = DBNull.Value;
            this.is_Tk_Du = DBNull.Value;
            this.is_No_Co = DBNull.Value;
            this.is_Ma_Dt = DBNull.Value;
            this.is_Ten_DtGTGT = DBNull.Value;
            this.is_Ma_DtGTGT = DBNull.Value;
            this.is_Dien_Giai = DBNull.Value;
            this.is_Thue_XNK = DBNull.Value;
            this.InitializeComponent();
            this.gridControl.AutoGenerateColumns = false;
            this.AppInvoiceParameters = po_AppInvoiceLib;
            this.ActiveTransaction = "3";
            this.MasterInvoiceOrder = ps_MasterInvoiceOrder;
            this.Posted = pi_MasterPosted;
            this.Ngay_Ct = pd_Ngay_Ct;
            this.So_Ct = ps_So_Ct;
            this.Ngay_Ct0 = pd_Ngay_Ct0;
            this.So_Ct0 = ps_So_Ct0;
            this.So_Seri0 = ps_So_Seri0;
            this.Tk = ps_Tk;
            this.Tk_Du = ps_Tk_Du;
            this.No_Co = ps_No_Co;
            this.Ma_Dt = ps_Ma_Dt;
            this.Ten_DtGTGT = ps_Ten_DtGTGT;
            this.Ma_DtGTGT = ps_Ma_DtGTGT;
            this.Dien_Giai = ps_Dien_Giai;
            this.TTien = pi_TTien;
            this.Thue_Suat = pi_Thue_Suat;
            this.TTien_VAT0 = pi_TTien_VAT0;
            this.TTien_VAT1 = pi_TTien_VAT1;
            this.Thue_XNK = ps_Thue_XNK;
            this.txtTTien_VAT0.Value = pi_TTien_VAT0;
            this.txtTTien_VAT1.Value = pi_TTien_VAT1;
            this.OnRefresh();
        }

        private void AddNotDeleteInvoice(object pd_Ngay_Ct, object ps_So_Ct, object ps_Dien_Giai)
        {
            if (this.oCanNotDelete == null)
            {
                this.oCanNotDelete = new DataTable();
                this.oCanNotDelete.Columns.Add("Ngay_Ct", typeof(DateTime));
                this.oCanNotDelete.Columns.Add("So_Ct", typeof(string));
                this.oCanNotDelete.Columns.Add("Dien_Giai", typeof(string));
            }
            DataRow row = this.oCanNotDelete.NewRow();
            row["Ngay_Ct"] = pd_Ngay_Ct;
            row["So_Ct"] = ps_So_Ct;
            row["Dien_Giai"] = ps_Dien_Giai;
            this.oCanNotDelete.Rows.Add(row);
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            this.NewChecked = true;
            this.OnAdd();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.OnCancel();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnDelete_Click(object sender, EventArgs e)
        {
            this.OnDelete();
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            this.OnEdit();
        }

        private void btnHistory_Click(object sender, EventArgs e)
        {
            new FormHistoryLister(this.AppInvoiceParameters, "T", this.VATInvoiceOrder).Show();
        }

        private void btnLock_Click(object sender, EventArgs e)
        {
            this.OnLock(true);
        }

        private void btnRefresh_Click(object sender, EventArgs e)
        {
            this.OnRefresh();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if (this.OnSave())
            {
                base.Close();
            }
        }

        private void btnUnLock_Click(object sender, EventArgs e)
        {
            this.OnLock(false);
        }

        private void Calculate()
        {
            if (this.txtVAT_Ck.Value.ToString() == "K")
            {
                this.txtThue_GTGT.Value = 0;
                this.txtTien3.Value = 0;
            }
            else
            {
                decimal num = decimal.Round((this.txtTien.NumericValue * this.txtThue_GTGT.NumericValue) / 100M, AppInstance.LCAmountDecimals);
                decimal numericValue = this.txtTien3.NumericValue;
                if ((numericValue == 0M) || (((numericValue < (num - AppInstance.VATRange)) || (numericValue > (num + AppInstance.VATRange))) && (MessageBox.Show("Giá trị VAT ch\x00eanh lệch qu\x00e1 giá trị cho ph\x00e9p.\nTính lại thuế giá trị gia tăng?", AppInstance.SoftwareName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)))
                {
                    this.txtTien3.Value = num;
                }
            }
        }

        private bool CheckInvoiceLock(object ps_InvoiceOrder, bool pb_Locked)
        {
            string str = null;
            if (!this.CheckInvoiceLock(ps_InvoiceOrder, pb_Locked, ref str))
            {
                MessageBox.Show(str, AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            return true;
        }

        private bool CheckInvoiceLock(object ps_InvoiceOrder, bool pb_Locked, ref string ps_WarningMessage)
        {
            int num = this.oMethod.CheckInvoiceLock(AppInstance.Subsidiary, AppInstance.UserName, ps_InvoiceOrder);
            if (num == 7)
            {
                ps_WarningMessage = "Chứng từ do người kh\x00e1c lập!";
                return false;
            }
            if ((num == 5) && pb_Locked)
            {
                ps_WarningMessage = "Chứng từ đã khóa!";
                return false;
            }
            if ((num == 2) && !pb_Locked)
            {
                ps_WarningMessage = "Chứng từ đã mở!";
                return false;
            }
            this.oMethod.Lock(AppInstance.UserName, ps_InvoiceOrder, pb_Locked);
            return true;
        }

        private bool CheckInvoiceStatus(object ps_InvoiceOrder)
        {
            string str = null;
            if (!this.CheckInvoiceStatus(ps_InvoiceOrder, ref str))
            {
                MessageBox.Show(str, AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            return true;
        }

        private bool CheckInvoiceStatus(object ps_InvoiceOrder, ref string ps_WarningMessage)
        {
            switch (this.oMethod.CheckInvoiceStatus(AppInstance.Subsidiary, AppInstance.UserName, ps_InvoiceOrder))
            {
                case 5:
                    ps_WarningMessage = "Chứng từ đã khóa!";
                    return false;

                case 6:
                    ps_WarningMessage = "Chứng từ đã được duyệt!";
                    return false;

                case 7:
                    ps_WarningMessage = "Chứng từ do người kh\x00e1c lập!";
                    return false;

                case 9:
                    ps_WarningMessage = "Dữ liệu đã khóa!";
                    return false;
            }
            return true;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void gridControl_CellEnter(object sender, DataGridViewCellEventArgs e)
        {
            if ((this.gridControl.CurrentRow != null) && (this.gridControl.CurrentRow.DataBoundItem != null))
            {
                this.VATInvoiceOrder = ((DataRowView) this.gridControl.CurrentRow.DataBoundItem).Row["SttV"].ToString();
            }
        }

        private void InitializeComponent()
        {
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormVATInput));
            this.Toolbars = new System.Windows.Forms.ToolStrip();
            this.btnRefresh = new System.Windows.Forms.ToolStripButton();
            this.tbrSep05 = new System.Windows.Forms.ToolStripSeparator();
            this.btnFunctions = new System.Windows.Forms.ToolStripDropDownButton();
            this.btnLock = new System.Windows.Forms.ToolStripMenuItem();
            this.tbrSep07 = new System.Windows.Forms.ToolStripSeparator();
            this.btnUnLock = new System.Windows.Forms.ToolStripMenuItem();
            this.tbrSep06 = new System.Windows.Forms.ToolStripSeparator();
            this.btnAdd = new System.Windows.Forms.ToolStripButton();
            this.btnEdit = new System.Windows.Forms.ToolStripButton();
            this.btnDelete = new System.Windows.Forms.ToolStripButton();
            this.tbrSep01 = new System.Windows.Forms.ToolStripSeparator();
            this.btnSave = new System.Windows.Forms.ToolStripButton();
            this.tbrSep02 = new System.Windows.Forms.ToolStripSeparator();
            this.btnCancel = new System.Windows.Forms.ToolStripButton();
            this.tbrSep03 = new System.Windows.Forms.ToolStripSeparator();
            this.btnHistory = new System.Windows.Forms.ToolStripButton();
            this.tbrSep04 = new System.Windows.Forms.ToolStripSeparator();
            this.btnClose = new System.Windows.Forms.ToolStripButton();
            this.splitContainer1 = new System.Windows.Forms.SplitContainer();
            this.gridControl = new QMVnSoft.Controls.GridControl();
            this.Column7 = new QMVnSoft.Controls.ChildGridControls.StatusColumn();
            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.Column5 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.Column6 = new QMVnSoft.Controls.ChildGridControls.NumericColumn();
            this.txtLoai_VAT = new QMVnSoft.Controls.TextOption();
            this.lblDieu_Chinh0 = new QMVnSoft.Controls.LabelControl();
            this.lblLoai_VAT0 = new QMVnSoft.Controls.LabelControl();
            this.lblLoai_VAT = new QMVnSoft.Controls.LabelControl();
            this.txtThue_GTGT = new QMVnSoft.Controls.TextNumeric();
            this.txtTTien_VAT1 = new QMVnSoft.Controls.TextNumeric();
            this.lblTTien_VAT1 = new QMVnSoft.Controls.LabelControl();
            this.txtTTien_VAT0 = new QMVnSoft.Controls.TextNumeric();
            this.lblTTien_VAT0 = new QMVnSoft.Controls.LabelControl();
            this.txtTien3 = new QMVnSoft.Controls.TextNumeric();
            this.lblTien3 = new QMVnSoft.Controls.LabelControl();
            this.txtTien = new QMVnSoft.Controls.TextNumeric();
            this.lblTien = new QMVnSoft.Controls.LabelControl();
            this.txtHoa_Don = new QMVnSoft.Controls.TextOption();
            this.txtDieu_Chinh = new QMVnSoft.Controls.TextOption();
            this.txtTSCD_Ck = new QMVnSoft.Controls.TextOption();
            this.txtHang_NLTS = new QMVnSoft.Controls.TextOption();
            this.txtThue_XNK = new QMVnSoft.Controls.TextOption();
            this.txtVAT_Ck = new QMVnSoft.Controls.TextOption();
            this.txtNo_Co = new QMVnSoft.Controls.TextOption();
            this.txtTen_Sp = new QMVnSoft.Controls.TextControl();
            this.txtTen_Dt = new QMVnSoft.Controls.TextControl();
            this.txtTen_Tk_Du = new QMVnSoft.Controls.TextControl();
            this.txtTen_Tk = new QMVnSoft.Controls.TextControl();
            this.lblHoa_Don = new QMVnSoft.Controls.LabelControl();
            this.lblDieu_Chinh = new QMVnSoft.Controls.LabelControl();
            this.txtMa_Sp = new QMVnSoft.Controls.TextSearch();
            this.txtMa_Dt = new QMVnSoft.Controls.TextSearch();
            this.lblMa_Sp = new QMVnSoft.Controls.LabelControl();
            this.lblTSCD_Ck = new QMVnSoft.Controls.LabelControl();
            this.lblMa_Dt = new QMVnSoft.Controls.LabelControl();
            this.lblHang_NLTS = new QMVnSoft.Controls.LabelControl();
            this.txtTk_Du = new QMVnSoft.Controls.TextSearch();
            this.lblThue_XNK = new QMVnSoft.Controls.LabelControl();
            this.lblTk_Du = new QMVnSoft.Controls.LabelControl();
            this.lblThue_GTGT = new QMVnSoft.Controls.LabelControl();
            this.txtTk = new QMVnSoft.Controls.TextSearch();
            this.lblTk = new QMVnSoft.Controls.LabelControl();
            this.txtNgay_Ct0 = new QMVnSoft.Controls.TextDate();
            this.lblSo_Seri0 = new QMVnSoft.Controls.LabelControl();
            this.lblGhi_Chu = new QMVnSoft.Controls.LabelControl();
            this.lblDien_Giai = new QMVnSoft.Controls.LabelControl();
            this.lblMa_DtGTGT = new QMVnSoft.Controls.LabelControl();
            this.lblTen_DtGTGT = new QMVnSoft.Controls.LabelControl();
            this.lblSo_Ct0 = new QMVnSoft.Controls.LabelControl();
            this.lblNgay_Ct0 = new QMVnSoft.Controls.LabelControl();
            this.txtSo_Seri0 = new QMVnSoft.Controls.TextControl();
            this.txtGhi_Chu = new QMVnSoft.Controls.TextControl();
            this.txtDien_Giai = new QMVnSoft.Controls.TextControl();
            this.txtMa_DtGTGT = new QMVnSoft.Controls.TextControl();
            this.txtTen_DtGTGT = new QMVnSoft.Controls.TextControl();
            this.txtSo_Ct0 = new QMVnSoft.Controls.TextControl();
            this.gBoxControl1 = new QMVnSoft.Controls.GBoxControl();
            this.txtNgay_Ct = new QMVnSoft.Controls.TextDate();
            this.lblNgay_Ct = new QMVnSoft.Controls.LabelControl();
            this.txtLocked = new QMVnSoft.Controls.TextControl();
            this.txtUserName = new QMVnSoft.Controls.TextControl();
            this.gBoxControl3 = new QMVnSoft.Controls.GBoxControl();
            this.gBoxControl2 = new QMVnSoft.Controls.GBoxControl();
            this.Toolbars.SuspendLayout();
            this.splitContainer1.Panel1.SuspendLayout();
            this.splitContainer1.Panel2.SuspendLayout();
            this.splitContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gridControl)).BeginInit();
            this.SuspendLayout();
            // 
            // Toolbars
            // 
            this.Toolbars.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.btnRefresh,
            this.tbrSep05,
            this.btnFunctions,
            this.tbrSep06,
            this.btnAdd,
            this.btnEdit,
            this.btnDelete,
            this.tbrSep01,
            this.btnSave,
            this.tbrSep02,
            this.btnCancel,
            this.tbrSep03,
            this.btnHistory,
            this.tbrSep04,
            this.btnClose});
            this.Toolbars.Location = new System.Drawing.Point(0, 0);
            this.Toolbars.Name = "Toolbars";
            this.Toolbars.Size = new System.Drawing.Size(794, 25);
            this.Toolbars.TabIndex = 0;
            this.Toolbars.Text = "Toolbars";
            // 
            // btnRefresh
            // 
            this.btnRefresh.Image = global::QMVnSoft.Properties.Resources.REFRESH;
            this.btnRefresh.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnRefresh.Name = "btnRefresh";
            this.btnRefresh.Size = new System.Drawing.Size(66, 22);
            this.btnRefresh.Text = "Refresh";
            this.btnRefresh.ToolTipText = "Refresh";
            this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
            // 
            // tbrSep05
            // 
            this.tbrSep05.Name = "tbrSep05";
            this.tbrSep05.Size = new System.Drawing.Size(6, 25);
            // 
            // btnFunctions
            // 
            this.btnFunctions.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.btnLock,
            this.tbrSep07,
            this.btnUnLock});
            this.btnFunctions.Image = global::QMVnSoft.Properties.Resources.FUNC;
            this.btnFunctions.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnFunctions.Name = "btnFunctions";
            this.btnFunctions.Size = new System.Drawing.Size(29, 22);
            this.btnFunctions.ToolTipText = "Chức năng";
            // 
            // btnLock
            // 
            this.btnLock.Name = "btnLock";
            this.btnLock.Size = new System.Drawing.Size(152, 22);
            this.btnLock.Text = "Khóa chứng từ";
            this.btnLock.Click += new System.EventHandler(this.btnLock_Click);
            // 
            // tbrSep07
            // 
            this.tbrSep07.Name = "tbrSep07";
            this.tbrSep07.Size = new System.Drawing.Size(149, 6);
            // 
            // btnUnLock
            // 
            this.btnUnLock.Name = "btnUnLock";
            this.btnUnLock.Size = new System.Drawing.Size(152, 22);
            this.btnUnLock.Text = "Mở chứng từ";
            this.btnUnLock.Click += new System.EventHandler(this.btnUnLock_Click);
            // 
            // tbrSep06
            // 
            this.tbrSep06.Name = "tbrSep06";
            this.tbrSep06.Size = new System.Drawing.Size(6, 25);
            // 
            // btnAdd
            // 
            this.btnAdd.Image = global::QMVnSoft.Properties.Resources.BALANCE1;
            this.btnAdd.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.Size = new System.Drawing.Size(58, 22);
            this.btnAdd.Text = "Thêm";
            this.btnAdd.ToolTipText = "F2";
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            // 
            // btnEdit
            // 
            this.btnEdit.Image = global::QMVnSoft.Properties.Resources.EDIT1;
            this.btnEdit.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnEdit.Name = "btnEdit";
            this.btnEdit.Size = new System.Drawing.Size(46, 22);
            this.btnEdit.Text = "Sửa";
            this.btnEdit.ToolTipText = "F3";
            this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
            // 
            // btnDelete
            // 
            this.btnDelete.Image = global::QMVnSoft.Properties.Resources.DELETE1;
            this.btnDelete.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnDelete.Name = "btnDelete";
            this.btnDelete.Size = new System.Drawing.Size(47, 22);
            this.btnDelete.Text = "Xóa";
            this.btnDelete.ToolTipText = "F8";
            this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
            // 
            // tbrSep01
            // 
            this.tbrSep01.Name = "tbrSep01";
            this.tbrSep01.Size = new System.Drawing.Size(6, 25);
            // 
            // btnSave
            // 
            this.btnSave.Enabled = false;
            this.btnSave.Image = global::QMVnSoft.Properties.Resources.SAVE1;
            this.btnSave.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnSave.Name = "btnSave";
            this.btnSave.Size = new System.Drawing.Size(47, 22);
            this.btnSave.Text = "Lưu";
            this.btnSave.ToolTipText = "F3";
            this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
            // 
            // tbrSep02
            // 
            this.tbrSep02.Name = "tbrSep02";
            this.tbrSep02.Size = new System.Drawing.Size(6, 25);
            // 
            // btnCancel
            // 
            this.btnCancel.Enabled = false;
            this.btnCancel.Image = global::QMVnSoft.Properties.Resources.CANCEL;
            this.btnCancel.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(49, 22);
            this.btnCancel.Text = "Huỷ";
            this.btnCancel.ToolTipText = "Esc";
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
            // 
            // tbrSep03
            // 
            this.tbrSep03.Name = "tbrSep03";
            this.tbrSep03.Size = new System.Drawing.Size(6, 25);
            // 
            // btnHistory
            // 
            this.btnHistory.Image = global::QMVnSoft.Properties.Resources.HISTORY1;
            this.btnHistory.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnHistory.Name = "btnHistory";
            this.btnHistory.Size = new System.Drawing.Size(64, 22);
            this.btnHistory.Text = "Lịch sử";
            this.btnHistory.ToolTipText = "Lịch sử";
            this.btnHistory.Click += new System.EventHandler(this.btnHistory_Click);
            // 
            // tbrSep04
            // 
            this.tbrSep04.Name = "tbrSep04";
            this.tbrSep04.Size = new System.Drawing.Size(6, 25);
            this.tbrSep04.Visible = false;
            // 
            // btnClose
            // 
            this.btnClose.Image = global::QMVnSoft.Properties.Resources.CLOSE;
            this.btnClose.ImageTransparentColor = System.Drawing.Color.Magenta;
            this.btnClose.Name = "btnClose";
            this.btnClose.Size = new System.Drawing.Size(58, 22);
            this.btnClose.Text = "Thoát";
            this.btnClose.ToolTipText = "Esc";
            this.btnClose.Visible = false;
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            // 
            // splitContainer1
            // 
            this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainer1.Location = new System.Drawing.Point(0, 25);
            this.splitContainer1.Name = "splitContainer1";
            // 
            // splitContainer1.Panel1
            // 
            this.splitContainer1.Panel1.Controls.Add(this.gridControl);
            // 
            // splitContainer1.Panel2
            // 
            this.splitContainer1.Panel2.Controls.Add(this.txtLoai_VAT);
            this.splitContainer1.Panel2.Controls.Add(this.lblDieu_Chinh0);
            this.splitContainer1.Panel2.Controls.Add(this.lblLoai_VAT0);
            this.splitContainer1.Panel2.Controls.Add(this.lblLoai_VAT);
            this.splitContainer1.Panel2.Controls.Add(this.txtThue_GTGT);
            this.splitContainer1.Panel2.Controls.Add(this.txtTTien_VAT1);
            this.splitContainer1.Panel2.Controls.Add(this.lblTTien_VAT1);
            this.splitContainer1.Panel2.Controls.Add(this.txtTTien_VAT0);
            this.splitContainer1.Panel2.Controls.Add(this.lblTTien_VAT0);
            this.splitContainer1.Panel2.Controls.Add(this.txtTien3);
            this.splitContainer1.Panel2.Controls.Add(this.lblTien3);
            this.splitContainer1.Panel2.Controls.Add(this.txtTien);
            this.splitContainer1.Panel2.Controls.Add(this.lblTien);
            this.splitContainer1.Panel2.Controls.Add(this.txtHoa_Don);
            this.splitContainer1.Panel2.Controls.Add(this.txtDieu_Chinh);
            this.splitContainer1.Panel2.Controls.Add(this.txtTSCD_Ck);
            this.splitContainer1.Panel2.Controls.Add(this.txtHang_NLTS);
            this.splitContainer1.Panel2.Controls.Add(this.txtThue_XNK);
            this.splitContainer1.Panel2.Controls.Add(this.txtVAT_Ck);
            this.splitContainer1.Panel2.Controls.Add(this.txtNo_Co);
            this.splitContainer1.Panel2.Controls.Add(this.txtTen_Sp);
            this.splitContainer1.Panel2.Controls.Add(this.txtTen_Dt);
            this.splitContainer1.Panel2.Controls.Add(this.txtTen_Tk_Du);
            this.splitContainer1.Panel2.Controls.Add(this.txtTen_Tk);
            this.splitContainer1.Panel2.Controls.Add(this.lblHoa_Don);
            this.splitContainer1.Panel2.Controls.Add(this.lblDieu_Chinh);
            this.splitContainer1.Panel2.Controls.Add(this.txtMa_Sp);
            this.splitContainer1.Panel2.Controls.Add(this.txtMa_Dt);
            this.splitContainer1.Panel2.Controls.Add(this.lblMa_Sp);
            this.splitContainer1.Panel2.Controls.Add(this.lblTSCD_Ck);
            this.splitContainer1.Panel2.Controls.Add(this.lblMa_Dt);
            this.splitContainer1.Panel2.Controls.Add(this.lblHang_NLTS);
            this.splitContainer1.Panel2.Controls.Add(this.txtTk_Du);
            this.splitContainer1.Panel2.Controls.Add(this.lblThue_XNK);
            this.splitContainer1.Panel2.Controls.Add(this.lblTk_Du);
            this.splitContainer1.Panel2.Controls.Add(this.lblThue_GTGT);
            this.splitContainer1.Panel2.Controls.Add(this.txtTk);
            this.splitContainer1.Panel2.Controls.Add(this.lblTk);
            this.splitContainer1.Panel2.Controls.Add(this.txtNgay_Ct0);
            this.splitContainer1.Panel2.Controls.Add(this.lblSo_Seri0);
            this.splitContainer1.Panel2.Controls.Add(this.lblGhi_Chu);
            this.splitContainer1.Panel2.Controls.Add(this.lblDien_Giai);
            this.splitContainer1.Panel2.Controls.Add(this.lblMa_DtGTGT);
            this.splitContainer1.Panel2.Controls.Add(this.lblTen_DtGTGT);
            this.splitContainer1.Panel2.Controls.Add(this.lblSo_Ct0);
            this.splitContainer1.Panel2.Controls.Add(this.lblNgay_Ct0);
            this.splitContainer1.Panel2.Controls.Add(this.txtSo_Seri0);
            this.splitContainer1.Panel2.Controls.Add(this.txtGhi_Chu);
            this.splitContainer1.Panel2.Controls.Add(this.txtDien_Giai);
            this.splitContainer1.Panel2.Controls.Add(this.txtMa_DtGTGT);
            this.splitContainer1.Panel2.Controls.Add(this.txtTen_DtGTGT);
            this.splitContainer1.Panel2.Controls.Add(this.txtSo_Ct0);
            this.splitContainer1.Panel2.Controls.Add(this.gBoxControl1);
            this.splitContainer1.Panel2.Controls.Add(this.txtNgay_Ct);
            this.splitContainer1.Panel2.Controls.Add(this.lblNgay_Ct);
            this.splitContainer1.Panel2.Controls.Add(this.txtLocked);
            this.splitContainer1.Panel2.Controls.Add(this.txtUserName);
            this.splitContainer1.Panel2.Controls.Add(this.gBoxControl3);
            this.splitContainer1.Panel2.Controls.Add(this.gBoxControl2);
            this.splitContainer1.Size = new System.Drawing.Size(794, 509);
            this.splitContainer1.SplitterDistance = 422;
            this.splitContainer1.SplitterWidth = 1;
            this.splitContainer1.TabIndex = 40;
            // 
            // gridControl
            // 
            this.gridControl.AllowUserToAddRows = false;
            this.gridControl.AllowUserToDeleteRows = false;
            this.gridControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.gridControl.CheckAutoSize = true;
            this.gridControl.CheckColor = false;
            this.gridControl.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.gridControl.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.Column7,
            this.Column1,
            this.Column2,
            this.Column3,
            this.Column4,
            this.Column5,
            this.Column6});
            this.gridControl.Font = new System.Drawing.Font("Arial", 8.25F);
            this.gridControl.Location = new System.Drawing.Point(4, 3);
            this.gridControl.Name = "gridControl";
            this.gridControl.ReadOnly = true;
            this.gridControl.Size = new System.Drawing.Size(417, 503);
            this.gridControl.TabIndex = 0;
            this.gridControl.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.gridControl_CellEnter);
            // 
            // Column7
            // 
            this.Column7.DataPropertyName = "Locked";
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
            this.Column7.DefaultCellStyle = dataGridViewCellStyle1;
            this.Column7.HeaderText = "";
            this.Column7.Name = "Column7";
            this.Column7.ReadOnly = true;
            this.Column7.Resizable = System.Windows.Forms.DataGridViewTriState.False;
            this.Column7.StatusField = 0;
            this.Column7.Width = 22;
            // 
            // Column1
            // 
            this.Column1.DataPropertyName = "No_Co";
            this.Column1.HeaderText = "Ps";
            this.Column1.Name = "Column1";
            this.Column1.ReadOnly = true;
            this.Column1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
            this.Column1.Width = 20;
            // 
            // Column2
            // 
            this.Column2.DataPropertyName = "So_Seri0";
            this.Column2.HeaderText = "Ký hiệu";
            this.Column2.Name = "Column2";
            this.Column2.ReadOnly = true;
            this.Column2.Width = 65;
            // 
            // Column3
            // 
            this.Column3.DataPropertyName = "Ngay_Ct0";
            this.Column3.HeaderText = "Ngày";
            this.Column3.Name = "Column3";
            this.Column3.ReadOnly = true;
            this.Column3.Resizable = System.Windows.Forms.DataGridViewTriState.False;
            this.Column3.Width = 62;
            // 
            // Column4
            // 
            this.Column4.DataPropertyName = "So_Ct0";
            this.Column4.HeaderText = "Số";
            this.Column4.Name = "Column4";
            this.Column4.ReadOnly = true;
            this.Column4.Width = 65;
            // 
            // Column5
            // 
            this.Column5.DataPropertyName = "Tien";
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column5.DefaultCellStyle = dataGridViewCellStyle2;
            this.Column5.HeaderText = "Doanh số";
            this.Column5.Name = "Column5";
            this.Column5.ReadOnly = true;
            this.Column5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column5.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.None;
            this.Column5.Width = 69;
            // 
            // Column6
            // 
            this.Column6.DataPropertyName = "Tien3";
            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
            this.Column6.DefaultCellStyle = dataGridViewCellStyle3;
            this.Column6.HeaderText = "Thuế";
            this.Column6.Name = "Column6";
            this.Column6.ReadOnly = true;
            this.Column6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
            this.Column6.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.None;
            this.Column6.Width = 71;
            // 
            // txtLoai_VAT
            // 
            this.txtLoai_VAT.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtLoai_VAT.CheckTextSearched = false;
            this.txtLoai_VAT.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtLoai_VAT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtLoai_VAT.InputMask = "1,2,3,4";
            this.txtLoai_VAT.Location = new System.Drawing.Point(103, 302);
            this.txtLoai_VAT.Name = "txtLoai_VAT";
            this.txtLoai_VAT.OldValue = null;
            this.txtLoai_VAT.ReadOnly = true;
            this.txtLoai_VAT.Size = new System.Drawing.Size(18, 20);
            this.txtLoai_VAT.TabIndex = 21;
            this.txtLoai_VAT.Text = "1";
            this.txtLoai_VAT.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtLoai_VAT.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtLoai_VAT.Value = "1";
            // 
            // lblDieu_Chinh0
            // 
            this.lblDieu_Chinh0.AutoSize = true;
            this.lblDieu_Chinh0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDieu_Chinh0.ForeColor = System.Drawing.Color.Blue;
            this.lblDieu_Chinh0.Location = new System.Drawing.Point(130, 370);
            this.lblDieu_Chinh0.Name = "lblDieu_Chinh0";
            this.lblDieu_Chinh0.Size = new System.Drawing.Size(130, 14);
            this.lblDieu_Chinh0.TabIndex = 81;
            this.lblDieu_Chinh0.Text = "C-Điều chỉnh, K-Phát sinh";
            // 
            // lblLoai_VAT0
            // 
            this.lblLoai_VAT0.AutoSize = true;
            this.lblLoai_VAT0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblLoai_VAT0.ForeColor = System.Drawing.Color.Blue;
            this.lblLoai_VAT0.Location = new System.Drawing.Point(127, 305);
            this.lblLoai_VAT0.Name = "lblLoai_VAT0";
            this.lblLoai_VAT0.Size = new System.Drawing.Size(241, 56);
            this.lblLoai_VAT0.TabIndex = 81;
            this.lblLoai_VAT0.Text = "1-Riêng cho SXKD chịu thuế\r\n2-Riêng cho SXKD không chịu thuế\r\n3-Chung cho SXKD ch" +
                "ịu thuế và không chịu thuế\r\n4-Dùng cho hoạt động đầu tư";
            // 
            // lblLoai_VAT
            // 
            this.lblLoai_VAT.AutoSize = true;
            this.lblLoai_VAT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblLoai_VAT.Location = new System.Drawing.Point(16, 305);
            this.lblLoai_VAT.Name = "lblLoai_VAT";
            this.lblLoai_VAT.Size = new System.Drawing.Size(54, 14);
            this.lblLoai_VAT.TabIndex = 81;
            this.lblLoai_VAT.Text = "Loại  thuế";
            // 
            // txtThue_GTGT
            // 
            this.txtThue_GTGT.AllowNegative = false;
            this.txtThue_GTGT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtThue_GTGT.Location = new System.Drawing.Point(120, 239);
            this.txtThue_GTGT.Name = "txtThue_GTGT";
            this.txtThue_GTGT.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtThue_GTGT.OldValue = null;
            this.txtThue_GTGT.ReadOnly = true;
            this.txtThue_GTGT.Size = new System.Drawing.Size(73, 20);
            this.txtThue_GTGT.TabIndex = 15;
            this.txtThue_GTGT.Text = "0.00";
            this.txtThue_GTGT.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtThue_GTGT.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.Percent;
            this.txtThue_GTGT.Value = ((object)(resources.GetObject("txtThue_GTGT.Value")));
            this.txtThue_GTGT.ZeroIsShown = true;
            this.txtThue_GTGT.Validated += new System.EventHandler(this.txtThue_GTGT_Validated);
            // 
            // txtTTien_VAT1
            // 
            this.txtTTien_VAT1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTTien_VAT1.Enabled = false;
            this.txtTTien_VAT1.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTTien_VAT1.Location = new System.Drawing.Point(269, 485);
            this.txtTTien_VAT1.Name = "txtTTien_VAT1";
            this.txtTTien_VAT1.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTTien_VAT1.OldValue = null;
            this.txtTTien_VAT1.Size = new System.Drawing.Size(90, 20);
            this.txtTTien_VAT1.TabIndex = 25;
            this.txtTTien_VAT1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTTien_VAT1.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.LocalAmount;
            this.txtTTien_VAT1.Value = ((object)(resources.GetObject("txtTTien_VAT1.Value")));
            // 
            // lblTTien_VAT1
            // 
            this.lblTTien_VAT1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.lblTTien_VAT1.AutoSize = true;
            this.lblTTien_VAT1.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTTien_VAT1.Location = new System.Drawing.Point(212, 488);
            this.lblTTien_VAT1.Name = "lblTTien_VAT1";
            this.lblTTien_VAT1.Size = new System.Drawing.Size(51, 14);
            this.lblTTien_VAT1.TabIndex = 80;
            this.lblTTien_VAT1.Text = "Phát sinh";
            // 
            // txtTTien_VAT0
            // 
            this.txtTTien_VAT0.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.txtTTien_VAT0.Enabled = false;
            this.txtTTien_VAT0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTTien_VAT0.Location = new System.Drawing.Point(103, 485);
            this.txtTTien_VAT0.Name = "txtTTien_VAT0";
            this.txtTTien_VAT0.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTTien_VAT0.OldValue = null;
            this.txtTTien_VAT0.Size = new System.Drawing.Size(90, 20);
            this.txtTTien_VAT0.TabIndex = 24;
            this.txtTTien_VAT0.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTTien_VAT0.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.LocalAmount;
            this.txtTTien_VAT0.Value = ((object)(resources.GetObject("txtTTien_VAT0.Value")));
            // 
            // lblTTien_VAT0
            // 
            this.lblTTien_VAT0.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lblTTien_VAT0.AutoSize = true;
            this.lblTTien_VAT0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTTien_VAT0.Location = new System.Drawing.Point(16, 488);
            this.lblTTien_VAT0.Name = "lblTTien_VAT0";
            this.lblTTien_VAT0.Size = new System.Drawing.Size(55, 14);
            this.lblTTien_VAT0.TabIndex = 80;
            this.lblTTien_VAT0.Text = "Tổng thuế";
            // 
            // txtTien3
            // 
            this.txtTien3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTien3.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTien3.Location = new System.Drawing.Point(269, 239);
            this.txtTien3.Name = "txtTien3";
            this.txtTien3.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTien3.OldValue = null;
            this.txtTien3.ReadOnly = true;
            this.txtTien3.Size = new System.Drawing.Size(90, 20);
            this.txtTien3.TabIndex = 16;
            this.txtTien3.Text = "0.00";
            this.txtTien3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTien3.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.LocalAmount;
            this.txtTien3.Value = ((object)(resources.GetObject("txtTien3.Value")));
            this.txtTien3.ZeroIsShown = true;
            this.txtTien3.Validated += new System.EventHandler(this.txtTien3_Validated);
            // 
            // lblTien3
            // 
            this.lblTien3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblTien3.AutoSize = true;
            this.lblTien3.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTien3.Location = new System.Drawing.Point(212, 242);
            this.lblTien3.Name = "lblTien3";
            this.lblTien3.Size = new System.Drawing.Size(51, 14);
            this.lblTien3.TabIndex = 80;
            this.lblTien3.Text = "Tiền thuế";
            // 
            // txtTien
            // 
            this.txtTien.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTien.Location = new System.Drawing.Point(103, 218);
            this.txtTien.Name = "txtTien";
            this.txtTien.NumericValue = new decimal(new int[] {
            0,
            0,
            0,
            0});
            this.txtTien.OldValue = null;
            this.txtTien.ReadOnly = true;
            this.txtTien.Size = new System.Drawing.Size(90, 20);
            this.txtTien.TabIndex = 13;
            this.txtTien.Text = "0.00";
            this.txtTien.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            this.txtTien.UserTextNumericFormat  = QMVnSoft.AppInstance.TextNumericFormat.LocalAmount;
            this.txtTien.Value = ((object)(resources.GetObject("txtTien.Value")));
            this.txtTien.ZeroIsShown = true;
            this.txtTien.Validated += new System.EventHandler(this.txtTien_Validated);
            // 
            // lblTien
            // 
            this.lblTien.AutoSize = true;
            this.lblTien.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTien.Location = new System.Drawing.Point(16, 221);
            this.lblTien.Name = "lblTien";
            this.lblTien.Size = new System.Drawing.Size(54, 14);
            this.lblTien.TabIndex = 80;
            this.lblTien.Text = "Tiền hàng";
            // 
            // txtHoa_Don
            // 
            this.txtHoa_Don.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtHoa_Don.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtHoa_Don.CheckTextSearched = false;
            this.txtHoa_Don.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtHoa_Don.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtHoa_Don.InputMask = "C,K";
            this.txtHoa_Don.Location = new System.Drawing.Point(341, 281);
            this.txtHoa_Don.Name = "txtHoa_Don";
            this.txtHoa_Don.OldValue = null;
            this.txtHoa_Don.ReadOnly = true;
            this.txtHoa_Don.Size = new System.Drawing.Size(18, 20);
            this.txtHoa_Don.TabIndex = 20;
            this.txtHoa_Don.Text = "C";
            this.txtHoa_Don.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtHoa_Don.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtHoa_Don.Value = "C";
            // 
            // txtDieu_Chinh
            // 
            this.txtDieu_Chinh.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtDieu_Chinh.CheckTextSearched = false;
            this.txtDieu_Chinh.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDieu_Chinh.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDieu_Chinh.InputMask = "C,K";
            this.txtDieu_Chinh.Location = new System.Drawing.Point(103, 367);
            this.txtDieu_Chinh.Name = "txtDieu_Chinh";
            this.txtDieu_Chinh.OldValue = null;
            this.txtDieu_Chinh.ReadOnly = true;
            this.txtDieu_Chinh.Size = new System.Drawing.Size(18, 20);
            this.txtDieu_Chinh.TabIndex = 22;
            this.txtDieu_Chinh.Text = "C";
            this.txtDieu_Chinh.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtDieu_Chinh.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDieu_Chinh.Value = "C";
            // 
            // txtTSCD_Ck
            // 
            this.txtTSCD_Ck.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtTSCD_Ck.CheckTextSearched = false;
            this.txtTSCD_Ck.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTSCD_Ck.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTSCD_Ck.InputMask = "C,K";
            this.txtTSCD_Ck.Location = new System.Drawing.Point(103, 281);
            this.txtTSCD_Ck.Name = "txtTSCD_Ck";
            this.txtTSCD_Ck.OldValue = null;
            this.txtTSCD_Ck.ReadOnly = true;
            this.txtTSCD_Ck.Size = new System.Drawing.Size(18, 20);
            this.txtTSCD_Ck.TabIndex = 19;
            this.txtTSCD_Ck.Text = "C";
            this.txtTSCD_Ck.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTSCD_Ck.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTSCD_Ck.Value = "C";
            // 
            // txtHang_NLTS
            // 
            this.txtHang_NLTS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtHang_NLTS.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtHang_NLTS.CheckTextSearched = false;
            this.txtHang_NLTS.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtHang_NLTS.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtHang_NLTS.InputMask = "C,K";
            this.txtHang_NLTS.Location = new System.Drawing.Point(341, 260);
            this.txtHang_NLTS.Name = "txtHang_NLTS";
            this.txtHang_NLTS.OldValue = null;
            this.txtHang_NLTS.ReadOnly = true;
            this.txtHang_NLTS.Size = new System.Drawing.Size(18, 20);
            this.txtHang_NLTS.TabIndex = 18;
            this.txtHang_NLTS.Text = "C";
            this.txtHang_NLTS.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtHang_NLTS.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtHang_NLTS.Value = "C";
            // 
            // txtThue_XNK
            // 
            this.txtThue_XNK.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtThue_XNK.CheckTextSearched = false;
            this.txtThue_XNK.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtThue_XNK.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtThue_XNK.InputMask = "C,K";
            this.txtThue_XNK.Location = new System.Drawing.Point(103, 260);
            this.txtThue_XNK.Name = "txtThue_XNK";
            this.txtThue_XNK.OldValue = null;
            this.txtThue_XNK.ReadOnly = true;
            this.txtThue_XNK.Size = new System.Drawing.Size(18, 20);
            this.txtThue_XNK.TabIndex = 17;
            this.txtThue_XNK.Text = "C";
            this.txtThue_XNK.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtThue_XNK.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtThue_XNK.Value = "C";
            // 
            // txtVAT_Ck
            // 
            this.txtVAT_Ck.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtVAT_Ck.CheckTextSearched = false;
            this.txtVAT_Ck.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtVAT_Ck.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtVAT_Ck.InputMask = "C,K";
            this.txtVAT_Ck.Location = new System.Drawing.Point(103, 239);
            this.txtVAT_Ck.Name = "txtVAT_Ck";
            this.txtVAT_Ck.OldValue = null;
            this.txtVAT_Ck.ReadOnly = true;
            this.txtVAT_Ck.Size = new System.Drawing.Size(18, 20);
            this.txtVAT_Ck.TabIndex = 14;
            this.txtVAT_Ck.Text = "C";
            this.txtVAT_Ck.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtVAT_Ck.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtVAT_Ck.Value = "C";
            this.txtVAT_Ck.Validated += new System.EventHandler(this.txtVAT_Ck_Validated);
            // 
            // txtNo_Co
            // 
            this.txtNo_Co.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtNo_Co.CheckTextSearched = false;
            this.txtNo_Co.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtNo_Co.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNo_Co.InputMask = "N,C";
            this.txtNo_Co.Location = new System.Drawing.Point(103, 71);
            this.txtNo_Co.Name = "txtNo_Co";
            this.txtNo_Co.OldValue = null;
            this.txtNo_Co.ReadOnly = true;
            this.txtNo_Co.Size = new System.Drawing.Size(18, 20);
            this.txtNo_Co.TabIndex = 5;
            this.txtNo_Co.Text = "N";
            this.txtNo_Co.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtNo_Co.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtNo_Co.Value = "N";
            // 
            // txtTen_Sp
            // 
            this.txtTen_Sp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Sp.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Sp.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Sp.CheckTextSearched = false;
            this.txtTen_Sp.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Sp.Enabled = false;
            this.txtTen_Sp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Sp.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Sp.Location = new System.Drawing.Point(199, 387);
            this.txtTen_Sp.Name = "txtTen_Sp";
            this.txtTen_Sp.OldValue = null;
            this.txtTen_Sp.Size = new System.Drawing.Size(160, 13);
            this.txtTen_Sp.TabIndex = 77;
            this.txtTen_Sp.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Sp.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Sp.Value = ((object)(resources.GetObject("txtTen_Sp.Value")));
            // 
            // txtTen_Dt
            // 
            this.txtTen_Dt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Dt.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Dt.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Dt.CheckTextSearched = false;
            this.txtTen_Dt.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Dt.Enabled = false;
            this.txtTen_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Dt.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Dt.Location = new System.Drawing.Point(199, 116);
            this.txtTen_Dt.Name = "txtTen_Dt";
            this.txtTen_Dt.OldValue = null;
            this.txtTen_Dt.Size = new System.Drawing.Size(160, 13);
            this.txtTen_Dt.TabIndex = 77;
            this.txtTen_Dt.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Dt.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Dt.Value = ((object)(resources.GetObject("txtTen_Dt.Value")));
            // 
            // txtTen_Tk_Du
            // 
            this.txtTen_Tk_Du.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Tk_Du.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Tk_Du.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Tk_Du.CheckTextSearched = false;
            this.txtTen_Tk_Du.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_Du.Enabled = false;
            this.txtTen_Tk_Du.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Tk_Du.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk_Du.Location = new System.Drawing.Point(199, 95);
            this.txtTen_Tk_Du.Name = "txtTen_Tk_Du";
            this.txtTen_Tk_Du.OldValue = null;
            this.txtTen_Tk_Du.Size = new System.Drawing.Size(160, 13);
            this.txtTen_Tk_Du.TabIndex = 77;
            this.txtTen_Tk_Du.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Tk_Du.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Tk_Du.Value = ((object)(resources.GetObject("txtTen_Tk_Du.Value")));
            // 
            // txtTen_Tk
            // 
            this.txtTen_Tk.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_Tk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247)))));
            this.txtTen_Tk.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.txtTen_Tk.CheckTextSearched = false;
            this.txtTen_Tk.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk.Enabled = false;
            this.txtTen_Tk.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_Tk.ForeColor = System.Drawing.Color.Blue;
            this.txtTen_Tk.Location = new System.Drawing.Point(199, 74);
            this.txtTen_Tk.Name = "txtTen_Tk";
            this.txtTen_Tk.OldValue = null;
            this.txtTen_Tk.Size = new System.Drawing.Size(160, 13);
            this.txtTen_Tk.TabIndex = 77;
            this.txtTen_Tk.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtTen_Tk.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_Tk.Value = ((object)(resources.GetObject("txtTen_Tk.Value")));
            // 
            // lblHoa_Don
            // 
            this.lblHoa_Don.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblHoa_Don.AutoSize = true;
            this.lblHoa_Don.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblHoa_Don.Location = new System.Drawing.Point(254, 284);
            this.lblHoa_Don.Name = "lblHoa_Don";
            this.lblHoa_Don.Size = new System.Drawing.Size(47, 14);
            this.lblHoa_Don.TabIndex = 76;
            this.lblHoa_Don.Text = "hóa đơn";
            // 
            // lblDieu_Chinh
            // 
            this.lblDieu_Chinh.AutoSize = true;
            this.lblDieu_Chinh.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDieu_Chinh.Location = new System.Drawing.Point(16, 370);
            this.lblDieu_Chinh.Name = "lblDieu_Chinh";
            this.lblDieu_Chinh.Size = new System.Drawing.Size(58, 14);
            this.lblDieu_Chinh.TabIndex = 76;
            this.lblDieu_Chinh.Text = "Điều chỉnh";
            // 
            // txtMa_Sp
            // 
            this.txtMa_Sp.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Sp.CheckTextSearched = false;
            this.txtMa_Sp.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Sp.EmptyIsValid = true;
            this.txtMa_Sp.FieldDisplay = "Ten_Bp";
            this.txtMa_Sp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Sp.FoundIsValid = true;
            this.txtMa_Sp.Location = new System.Drawing.Point(103, 388);
            this.txtMa_Sp.MaxLength = 32;
            this.txtMa_Sp.Name = "txtMa_Sp";
            this.txtMa_Sp.OldValue = null;
            this.txtMa_Sp.ReadOnly = true;
            this.txtMa_Sp.Size = new System.Drawing.Size(90, 20);
            this.txtMa_Sp.TabIndex = 23;
            this.txtMa_Sp.TableName = "DMSP";
            this.txtMa_Sp.TextDisplay = this.txtTen_Sp;
            this.txtMa_Sp.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Sp.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Sp.Value = ((object)(resources.GetObject("txtMa_Sp.Value")));
            // 
            // txtMa_Dt
            // 
            this.txtMa_Dt.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_Dt.CheckTextSearched = false;
            this.txtMa_Dt.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtMa_Dt.EmptyIsValid = true;
            this.txtMa_Dt.FieldDisplay = "Ten_Dt";
            this.txtMa_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_Dt.FoundIsValid = true;
            this.txtMa_Dt.Location = new System.Drawing.Point(103, 113);
            this.txtMa_Dt.MaxLength = 32;
            this.txtMa_Dt.Name = "txtMa_Dt";
            this.txtMa_Dt.OldValue = null;
            this.txtMa_Dt.ReadOnly = true;
            this.txtMa_Dt.Size = new System.Drawing.Size(90, 20);
            this.txtMa_Dt.TabIndex = 8;
            this.txtMa_Dt.TableName = "DMDT";
            this.txtMa_Dt.TextDisplay = this.txtTen_Dt;
            this.txtMa_Dt.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtMa_Dt.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtMa_Dt.Value = ((object)(resources.GetObject("txtMa_Dt.Value")));
            this.txtMa_Dt.Validated += new System.EventHandler(this.txtMa_Dt_Validated);
            // 
            // lblMa_Sp
            // 
            this.lblMa_Sp.AutoSize = true;
            this.lblMa_Sp.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Sp.Location = new System.Drawing.Point(16, 391);
            this.lblMa_Sp.Name = "lblMa_Sp";
            this.lblMa_Sp.Size = new System.Drawing.Size(36, 14);
            this.lblMa_Sp.TabIndex = 76;
            this.lblMa_Sp.Text = "Dự án";
            // 
            // lblTSCD_Ck
            // 
            this.lblTSCD_Ck.AutoSize = true;
            this.lblTSCD_Ck.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTSCD_Ck.Location = new System.Drawing.Point(16, 284);
            this.lblTSCD_Ck.Name = "lblTSCD_Ck";
            this.lblTSCD_Ck.Size = new System.Drawing.Size(80, 14);
            this.lblTSCD_Ck.TabIndex = 76;
            this.lblTSCD_Ck.Text = "Tài sản cố định";
            // 
            // lblMa_Dt
            // 
            this.lblMa_Dt.AutoSize = true;
            this.lblMa_Dt.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_Dt.Location = new System.Drawing.Point(16, 116);
            this.lblMa_Dt.Name = "lblMa_Dt";
            this.lblMa_Dt.Size = new System.Drawing.Size(70, 14);
            this.lblMa_Dt.TabIndex = 76;
            this.lblMa_Dt.Text = "Mã đối tượng";
            // 
            // lblHang_NLTS
            // 
            this.lblHang_NLTS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblHang_NLTS.AutoSize = true;
            this.lblHang_NLTS.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblHang_NLTS.Location = new System.Drawing.Point(254, 263);
            this.lblHang_NLTS.Name = "lblHang_NLTS";
            this.lblHang_NLTS.Size = new System.Drawing.Size(79, 14);
            this.lblHang_NLTS.TabIndex = 76;
            this.lblHang_NLTS.Text = "hàng nông sản";
            // 
            // txtTk_Du
            // 
            this.txtTk_Du.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtTk_Du.CheckTextSearched = false;
            this.txtTk_Du.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTk_Du.FieldDisplay = "Ten_Tk";
            this.txtTk_Du.FirstFilter = "Loai_Tk = \'C\'";
            this.txtTk_Du.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTk_Du.FoundIsValid = true;
            this.txtTk_Du.Location = new System.Drawing.Point(103, 92);
            this.txtTk_Du.MaxLength = 32;
            this.txtTk_Du.Name = "txtTk_Du";
            this.txtTk_Du.OldValue = null;
            this.txtTk_Du.ReadOnly = true;
            this.txtTk_Du.Size = new System.Drawing.Size(90, 20);
            this.txtTk_Du.TabIndex = 7;
            this.txtTk_Du.TableName = "DMTK";
            this.txtTk_Du.TextDisplay = this.txtTen_Tk_Du;
            this.txtTk_Du.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtTk_Du.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtTk_Du.Value = ((object)(resources.GetObject("txtTk_Du.Value")));
            // 
            // lblThue_XNK
            // 
            this.lblThue_XNK.AutoSize = true;
            this.lblThue_XNK.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblThue_XNK.Location = new System.Drawing.Point(16, 263);
            this.lblThue_XNK.Name = "lblThue_XNK";
            this.lblThue_XNK.Size = new System.Drawing.Size(55, 14);
            this.lblThue_XNK.TabIndex = 76;
            this.lblThue_XNK.Text = "hàng XNK";
            // 
            // lblTk_Du
            // 
            this.lblTk_Du.AutoSize = true;
            this.lblTk_Du.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTk_Du.Location = new System.Drawing.Point(16, 95);
            this.lblTk_Du.Name = "lblTk_Du";
            this.lblTk_Du.Size = new System.Drawing.Size(83, 14);
            this.lblTk_Du.TabIndex = 76;
            this.lblTk_Du.Text = "T.khoản đối ứng";
            // 
            // lblThue_GTGT
            // 
            this.lblThue_GTGT.AutoSize = true;
            this.lblThue_GTGT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblThue_GTGT.Location = new System.Drawing.Point(16, 242);
            this.lblThue_GTGT.Name = "lblThue_GTGT";
            this.lblThue_GTGT.Size = new System.Drawing.Size(55, 14);
            this.lblThue_GTGT.TabIndex = 76;
            this.lblThue_GTGT.Text = "Thuế suất";
            // 
            // txtTk
            // 
            this.txtTk.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtTk.CheckTextSearched = false;
            this.txtTk.DisabledForeColor = System.Drawing.Color.Empty;
            this.txtTk.FieldDisplay = "Ten_Tk";
            this.txtTk.FirstFilter = "Loai_Tk = \'C\'";
            this.txtTk.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTk.FoundIsValid = true;
            this.txtTk.Location = new System.Drawing.Point(120, 71);
            this.txtTk.MaxLength = 32;
            this.txtTk.Name = "txtTk";
            this.txtTk.OldValue = null;
            this.txtTk.ReadOnly = true;
            this.txtTk.Size = new System.Drawing.Size(73, 20);
            this.txtTk.TabIndex = 6;
            this.txtTk.TableName = "DMTK";
            this.txtTk.TextDisplay = this.txtTen_Tk;
            this.txtTk.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemCode;
            this.txtTk.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.All;
            this.txtTk.Value = ((object)(resources.GetObject("txtTk.Value")));
            // 
            // lblTk
            // 
            this.lblTk.AutoSize = true;
            this.lblTk.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTk.Location = new System.Drawing.Point(16, 74);
            this.lblTk.Name = "lblTk";
            this.lblTk.Size = new System.Drawing.Size(53, 14);
            this.lblTk.TabIndex = 76;
            this.lblTk.Text = "Tài khoản";
            // 
            // txtNgay_Ct0
            // 
            this.txtNgay_Ct0.DateTimeFormat  = QMVnSoft.Controls.TextDate.DateTimeFormatType.Date;
            this.txtNgay_Ct0.Enabled = false;
            this.txtNgay_Ct0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNgay_Ct0.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
            this.txtNgay_Ct0.Location = new System.Drawing.Point(103, 29);
            this.txtNgay_Ct0.Mask = "00/00/0000";
            this.txtNgay_Ct0.Name = "txtNgay_Ct0";
            this.txtNgay_Ct0.OldValue = null;
            this.txtNgay_Ct0.Size = new System.Drawing.Size(90, 20);
            this.txtNgay_Ct0.TabIndex = 2;
            this.txtNgay_Ct0.Value = ((object)(resources.GetObject("txtNgay_Ct0.Value")));
            // 
            // lblSo_Seri0
            // 
            this.lblSo_Seri0.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.lblSo_Seri0.AutoSize = true;
            this.lblSo_Seri0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblSo_Seri0.Location = new System.Drawing.Point(220, 53);
            this.lblSo_Seri0.Name = "lblSo_Seri0";
            this.lblSo_Seri0.Size = new System.Drawing.Size(43, 14);
            this.lblSo_Seri0.TabIndex = 18;
            this.lblSo_Seri0.Text = "Ký hiệu";
            // 
            // lblGhi_Chu
            // 
            this.lblGhi_Chu.AutoSize = true;
            this.lblGhi_Chu.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblGhi_Chu.Location = new System.Drawing.Point(16, 200);
            this.lblGhi_Chu.Name = "lblGhi_Chu";
            this.lblGhi_Chu.Size = new System.Drawing.Size(44, 14);
            this.lblGhi_Chu.TabIndex = 18;
            this.lblGhi_Chu.Text = "Ghi chú";
            // 
            // lblDien_Giai
            // 
            this.lblDien_Giai.AutoSize = true;
            this.lblDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblDien_Giai.Location = new System.Drawing.Point(16, 179);
            this.lblDien_Giai.Name = "lblDien_Giai";
            this.lblDien_Giai.Size = new System.Drawing.Size(51, 14);
            this.lblDien_Giai.TabIndex = 18;
            this.lblDien_Giai.Text = "Mặt hàng";
            // 
            // lblMa_DtGTGT
            // 
            this.lblMa_DtGTGT.AutoSize = true;
            this.lblMa_DtGTGT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblMa_DtGTGT.Location = new System.Drawing.Point(16, 158);
            this.lblMa_DtGTGT.Name = "lblMa_DtGTGT";
            this.lblMa_DtGTGT.Size = new System.Drawing.Size(60, 14);
            this.lblMa_DtGTGT.TabIndex = 18;
            this.lblMa_DtGTGT.Text = "Mã số thuế";
            // 
            // lblTen_DtGTGT
            // 
            this.lblTen_DtGTGT.AutoSize = true;
            this.lblTen_DtGTGT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblTen_DtGTGT.Location = new System.Drawing.Point(16, 137);
            this.lblTen_DtGTGT.Name = "lblTen_DtGTGT";
            this.lblTen_DtGTGT.Size = new System.Drawing.Size(74, 14);
            this.lblTen_DtGTGT.TabIndex = 18;
            this.lblTen_DtGTGT.Text = "Tên đối tượng";
            // 
            // lblSo_Ct0
            // 
            this.lblSo_Ct0.AutoSize = true;
            this.lblSo_Ct0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblSo_Ct0.Location = new System.Drawing.Point(16, 53);
            this.lblSo_Ct0.Name = "lblSo_Ct0";
            this.lblSo_Ct0.Size = new System.Drawing.Size(63, 14);
            this.lblSo_Ct0.TabIndex = 18;
            this.lblSo_Ct0.Text = "Số hóa đơn";
            // 
            // lblNgay_Ct0
            // 
            this.lblNgay_Ct0.AutoSize = true;
            this.lblNgay_Ct0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblNgay_Ct0.Location = new System.Drawing.Point(16, 32);
            this.lblNgay_Ct0.Name = "lblNgay_Ct0";
            this.lblNgay_Ct0.Size = new System.Drawing.Size(75, 14);
            this.lblNgay_Ct0.TabIndex = 19;
            this.lblNgay_Ct0.Text = "Ngày hóa đơn";
            // 
            // txtSo_Seri0
            // 
            this.txtSo_Seri0.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtSo_Seri0.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtSo_Seri0.CheckTextSearched = false;
            this.txtSo_Seri0.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtSo_Seri0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtSo_Seri0.Location = new System.Drawing.Point(269, 50);
            this.txtSo_Seri0.MaxLength = 20;
            this.txtSo_Seri0.Name = "txtSo_Seri0";
            this.txtSo_Seri0.OldValue = null;
            this.txtSo_Seri0.ReadOnly = true;
            this.txtSo_Seri0.Size = new System.Drawing.Size(90, 20);
            this.txtSo_Seri0.TabIndex = 4;
            this.txtSo_Seri0.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceNumber;
            this.txtSo_Seri0.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtSo_Seri0.Value = ((object)(resources.GetObject("txtSo_Seri0.Value")));
            // 
            // txtGhi_Chu
            // 
            this.txtGhi_Chu.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtGhi_Chu.CheckTextSearched = false;
            this.txtGhi_Chu.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtGhi_Chu.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtGhi_Chu.Location = new System.Drawing.Point(103, 197);
            this.txtGhi_Chu.MaxLength = 254;
            this.txtGhi_Chu.Name = "txtGhi_Chu";
            this.txtGhi_Chu.OldValue = null;
            this.txtGhi_Chu.ReadOnly = true;
            this.txtGhi_Chu.Size = new System.Drawing.Size(256, 20);
            this.txtGhi_Chu.TabIndex = 12;
            this.txtGhi_Chu.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtGhi_Chu.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtGhi_Chu.Value = ((object)(resources.GetObject("txtGhi_Chu.Value")));
            // 
            // txtDien_Giai
            // 
            this.txtDien_Giai.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtDien_Giai.CheckTextSearched = false;
            this.txtDien_Giai.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtDien_Giai.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtDien_Giai.Location = new System.Drawing.Point(103, 176);
            this.txtDien_Giai.MaxLength = 254;
            this.txtDien_Giai.Name = "txtDien_Giai";
            this.txtDien_Giai.OldValue = null;
            this.txtDien_Giai.ReadOnly = true;
            this.txtDien_Giai.Size = new System.Drawing.Size(256, 20);
            this.txtDien_Giai.TabIndex = 11;
            this.txtDien_Giai.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceDescription;
            this.txtDien_Giai.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtDien_Giai.Value = ((object)(resources.GetObject("txtDien_Giai.Value")));
            // 
            // txtMa_DtGTGT
            // 
            this.txtMa_DtGTGT.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtMa_DtGTGT.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtMa_DtGTGT.CheckTextSearched = false;
            this.txtMa_DtGTGT.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtMa_DtGTGT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtMa_DtGTGT.Location = new System.Drawing.Point(103, 155);
            this.txtMa_DtGTGT.MaxLength = 20;
            this.txtMa_DtGTGT.Name = "txtMa_DtGTGT";
            this.txtMa_DtGTGT.OldValue = null;
            this.txtMa_DtGTGT.ReadOnly = true;
            this.txtMa_DtGTGT.Size = new System.Drawing.Size(256, 20);
            this.txtMa_DtGTGT.TabIndex = 10;
            this.txtMa_DtGTGT.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceNumber;
            this.txtMa_DtGTGT.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtMa_DtGTGT.Value = ((object)(resources.GetObject("txtMa_DtGTGT.Value")));
            // 
            // txtTen_DtGTGT
            // 
            this.txtTen_DtGTGT.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.txtTen_DtGTGT.CheckTextSearched = false;
            this.txtTen_DtGTGT.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtTen_DtGTGT.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtTen_DtGTGT.Location = new System.Drawing.Point(103, 134);
            this.txtTen_DtGTGT.MaxLength = 128;
            this.txtTen_DtGTGT.Name = "txtTen_DtGTGT";
            this.txtTen_DtGTGT.OldValue = null;
            this.txtTen_DtGTGT.ReadOnly = true;
            this.txtTen_DtGTGT.Size = new System.Drawing.Size(256, 20);
            this.txtTen_DtGTGT.TabIndex = 9;
            this.txtTen_DtGTGT.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.ItemDescription;
            this.txtTen_DtGTGT.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtTen_DtGTGT.Value = ((object)(resources.GetObject("txtTen_DtGTGT.Value")));
            // 
            // txtSo_Ct0
            // 
            this.txtSo_Ct0.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
            this.txtSo_Ct0.CheckTextSearched = false;
            this.txtSo_Ct0.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtSo_Ct0.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtSo_Ct0.Location = new System.Drawing.Point(103, 50);
            this.txtSo_Ct0.MaxLength = 20;
            this.txtSo_Ct0.Name = "txtSo_Ct0";
            this.txtSo_Ct0.OldValue = null;
            this.txtSo_Ct0.ReadOnly = true;
            this.txtSo_Ct0.Size = new System.Drawing.Size(90, 20);
            this.txtSo_Ct0.TabIndex = 3;
            this.txtSo_Ct0.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.InvoiceNumber;
            this.txtSo_Ct0.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtSo_Ct0.Value = ((object)(resources.GetObject("txtSo_Ct0.Value")));
            // 
            // gBoxControl1
            // 
            this.gBoxControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)));
            this.gBoxControl1.Font = new System.Drawing.Font("Arial", 8.25F);
            this.gBoxControl1.Location = new System.Drawing.Point(1, -6);
            this.gBoxControl1.Name = "gBoxControl1";
            this.gBoxControl1.Size = new System.Drawing.Size(2, 516);
            this.gBoxControl1.TabIndex = 0;
            this.gBoxControl1.TabStop = false;
            // 
            // txtNgay_Ct
            // 
            this.txtNgay_Ct.DateTimeFormat  = QMVnSoft.Controls.TextDate.DateTimeFormatType.Date;
            this.txtNgay_Ct.Enabled = false;
            this.txtNgay_Ct.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtNgay_Ct.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
            this.txtNgay_Ct.Location = new System.Drawing.Point(103, 4);
            this.txtNgay_Ct.Mask = "00/00/0000";
            this.txtNgay_Ct.Name = "txtNgay_Ct";
            this.txtNgay_Ct.OldValue = null;
            this.txtNgay_Ct.Size = new System.Drawing.Size(90, 20);
            this.txtNgay_Ct.TabIndex = 1;
            this.txtNgay_Ct.Value = ((object)(resources.GetObject("txtNgay_Ct.Value")));
            // 
            // lblNgay_Ct
            // 
            this.lblNgay_Ct.AutoSize = true;
            this.lblNgay_Ct.Font = new System.Drawing.Font("Arial", 8.25F);
            this.lblNgay_Ct.Location = new System.Drawing.Point(16, 7);
            this.lblNgay_Ct.Name = "lblNgay_Ct";
            this.lblNgay_Ct.Size = new System.Drawing.Size(68, 14);
            this.lblNgay_Ct.TabIndex = 13;
            this.lblNgay_Ct.Text = "Ngày kê khai";
            // 
            // txtLocked
            // 
            this.txtLocked.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtLocked.BackColor = System.Drawing.Color.Aquamarine;
            this.txtLocked.CheckTextSearched = false;
            this.txtLocked.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtLocked.Enabled = false;
            this.txtLocked.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtLocked.Location = new System.Drawing.Point(244, 4);
            this.txtLocked.Name = "txtLocked";
            this.txtLocked.OldValue = null;
            this.txtLocked.Size = new System.Drawing.Size(58, 20);
            this.txtLocked.TabIndex = 10;
            this.txtLocked.Text = "Khóa";
            this.txtLocked.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtLocked.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtLocked.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtLocked.Value = "Khóa";
            // 
            // txtUserName
            // 
            this.txtUserName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.txtUserName.BackColor = System.Drawing.Color.Aquamarine;
            this.txtUserName.CheckTextSearched = false;
            this.txtUserName.DisabledForeColor = System.Drawing.Color.Blue;
            this.txtUserName.Enabled = false;
            this.txtUserName.Font = new System.Drawing.Font("Arial", 8.25F);
            this.txtUserName.Location = new System.Drawing.Point(301, 4);
            this.txtUserName.Name = "txtUserName";
            this.txtUserName.OldValue = null;
            this.txtUserName.Size = new System.Drawing.Size(58, 20);
            this.txtUserName.TabIndex = 11;
            this.txtUserName.Text = "ADMIN";
            this.txtUserName.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
            this.txtUserName.UserTextLength  = QMVnSoft.AppInstance.TextControlLength.None;
            this.txtUserName.UserTrimMode  = QMVnSoft.AppInstance.TextControlTrimMode.Right;
            this.txtUserName.Value = "ADMIN";
            // 
            // gBoxControl3
            // 
            this.gBoxControl3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.gBoxControl3.Font = new System.Drawing.Font("Arial", 8.25F);
            this.gBoxControl3.Location = new System.Drawing.Point(2, 474);
            this.gBoxControl3.Name = "gBoxControl3";
            this.gBoxControl3.Size = new System.Drawing.Size(372, 7);
            this.gBoxControl3.TabIndex = 14;
            this.gBoxControl3.TabStop = false;
            // 
            // gBoxControl2
            // 
            this.gBoxControl2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.gBoxControl2.Font = new System.Drawing.Font("Arial", 8.25F);
            this.gBoxControl2.Location = new System.Drawing.Point(2, 21);
            this.gBoxControl2.Name = "gBoxControl2";
            this.gBoxControl2.Size = new System.Drawing.Size(372, 7);
            this.gBoxControl2.TabIndex = 14;
            this.gBoxControl2.TabStop = false;
            // 
            // FormVATInput
            // 
            this.ClientSize = new System.Drawing.Size(794, 534);
            this.Controls.Add(this.splitContainer1);
            this.Controls.Add(this.Toolbars);
            this.MinimumSize = new System.Drawing.Size(802, 566);
            this.Name = "FormVATInput";
            this.Text = "Khai báo hóa đơn giá trị gia tăng";
            this.Toolbars.ResumeLayout(false);
            this.Toolbars.PerformLayout();
            this.splitContainer1.Panel1.ResumeLayout(false);
            this.splitContainer1.Panel2.ResumeLayout(false);
            this.splitContainer1.Panel2.PerformLayout();
            this.splitContainer1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.gridControl)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        protected virtual void OnAchieve()
        {
            this.LocalCurrentRow = this.oMethod.GetDataRow(this.VATInvoiceOrder);
        }

        protected virtual void OnAdd()
        {
            if (!this.AppInvoiceParameters.AllowAddInvoice)
            {
                MessageBox.Show("Không có quyền thêm chứng từ!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else
            {
                this.NewChecked = true;
                decimal num = 0M;
                decimal num2 = 0M;
                decimal num3 = 0M;
                object obj2 = "";
                object obj3 = "";
                this.SavedInvoiceOrder = AppDataAccess.Cong_So_Tt(AppInstance.Subsidiary);
                if (this.ActiveTransaction == "3")
                {
                    num = this.TTien - this.TTien1;
                    num2 = this.TTien_VAT0 - this.TTien_VAT1;
                    num3 = (num != 0M) ? decimal.Round((num2 / num) * 100M, 0) : 0M;
                }
                else
                {
                    this.MasterInvoiceOrder = this.SavedInvoiceOrder;
                }
                if (this.oTable.Rows.Count == 0)
                {
                    this.oMethod.So_Seri_Get(AppInstance.Subsidiary, this.InvoiceCode, this.Ngay_Ct, this.MasterInvoiceOrder, ref obj2, ref obj3);
                    this.So_Seri0 = string.IsNullOrEmpty(this.So_Seri0.ToString()) ? obj2 : this.So_Seri0;
                    this.LocalCurrentRow["SttV"] = this.SavedInvoiceOrder;
                    this.LocalCurrentRow["Tk"] = this.Tk;
                    this.LocalCurrentRow["Tk_Du"] = this.Tk_Du;
                    this.LocalCurrentRow["No_Co"] = this.No_Co;
                    this.LocalCurrentRow["Ngay_Ct0"] = this.Ngay_Ct0;
                    this.LocalCurrentRow["So_Ct0"] = this.So_Ct0;
                    this.LocalCurrentRow["So_Seri0"] = this.So_Seri0;
                    this.LocalCurrentRow["Mau_So0"] = obj3;
                    this.LocalCurrentRow["Ma_Ct"] = this.InvoiceCode;
                    this.LocalCurrentRow["Ngay_Ct"] = this.Ngay_Ct;
                    this.LocalCurrentRow["So_Ct"] = this.So_Ct;
                    this.LocalCurrentRow["Dien_Giai"] = this.Dien_Giai;
                    this.LocalCurrentRow["Ma_Dt"] = this.Ma_Dt;
                    this.LocalCurrentRow["Ten_Dt"] = this.Ten_DtGTGT;
                    this.LocalCurrentRow["Ten_DtGTGT"] = this.Ten_DtGTGT;
                    this.LocalCurrentRow["Ma_DtGTGT"] = this.Ma_DtGTGT;
                    this.LocalCurrentRow["Hoa_Don"] = "C";
                    this.LocalCurrentRow["Thue_XNK"] = this.Thue_XNK;
                    this.LocalCurrentRow["TSCD_Ck"] = "K";
                    this.LocalCurrentRow["VAT_Ck"] = "C";
                    this.LocalCurrentRow["Dieu_Chinh"] = "K";
                    this.LocalCurrentRow["Hang_NLTS"] = "K";
                    this.LocalCurrentRow["Loai_VAT"] = "1";
                    this.LocalCurrentRow["UserName"] = AppInstance.UserName;
                    this.LocalCurrentRow["Thue_GTGT"] = num3;
                    this.LocalCurrentRow["Tien"] = num;
                    this.LocalCurrentRow["Tien3"] = num2;
                    this.LocalCurrentRow["Locked"] = this.AppInvoiceParameters.DefaultLockStatus;
                    this.LocalCurrentRow["Posted"] = this.Posted;
                }
                else
                {
                    this.LocalCurrentRow["SttV"] = this.SavedInvoiceOrder;
                    this.LocalCurrentRow["Ngay_Ct"] = this.Ngay_Ct;
                    this.LocalCurrentRow["UserName"] = AppInstance.UserName;
                    this.LocalCurrentRow["Thue_GTGT"] = num3;
                    this.LocalCurrentRow["Tien"] = num;
                    this.LocalCurrentRow["Tien3"] = num2;
                    this.LocalCurrentRow["Locked"] = this.AppInvoiceParameters.DefaultLockStatus;
                    this.LocalCurrentRow["Posted"] = this.Posted;
                }
                this.OnShow();
                this.OnResetStatus(false);
                this.txtNgay_Ct.Focus();
            }
        }

        protected virtual void OnCancel()
        {
            this.OnShow();
            this.OnResetStatus(true);
        }

        protected virtual void OnDelete()
        {
            if (!this.AppInvoiceParameters.AllowDeleteInvoice)
            {
                MessageBox.Show("Không có quyền xóa chứng từ!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else if ((this.gridControl.Rows.Count != 0) && (MessageBox.Show(AppInstance.DeleMessage, AppInstance.SoftwareName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes))
            {
                if ((this.gridControl.SelectedRows != null) && (this.gridControl.SelectedRows.Count <= 1))
                {
                    DataRow row = ((DataRowView) this.gridControl.CurrentRow.DataBoundItem).Row;
                    if (!this.CheckInvoiceStatus(row["SttV"].ToString()))
                    {
                        return;
                    }
                    this.oMethod.Delete(AppInstance.UserName, row["SttV"]);
                    this.oTable.Rows.Remove(row);
                    this.Sum();
                }
                else
                {
                    this.oCanNotDelete = null;
                    bool flag = false;
                    string str = null;
                    foreach (DataGridViewRow row2 in this.gridControl.SelectedRows)
                    {
                        DataRow row3 = ((DataRowView) row2.DataBoundItem).Row;
                        if (this.CheckInvoiceStatus(row3["SttV"], ref str))
                        {
                            this.oMethod.Delete(AppInstance.UserName, row3["SttV"]);
                            this.oTable.Rows.Remove(row3);
                            flag = true;
                        }
                        else
                        {
                            this.AddNotDeleteInvoice(row3["Ngay_Ct0"], row3["So_Ct0"], str);
                        }
                    }
                    if (flag)
                    {
                        this.Sum();
                    }
                    if ((this.oCanNotDelete != null) && (this.oCanNotDelete.Rows.Count > 0))
                    {
                        str = "Chứng từ không xóa được.";
                        new FormNotDeletes(str, this.oCanNotDelete).ShowDialog();
                    }
                }
                if (this.VATToolbarButton != null)
                {
                    this.VATToolbarButton.ForeColor = this.AppInvoiceParameters.CtVAT_Status_Get(this.MasterInvoiceOrder);
                }
            }
        }

        protected virtual void OnEdit()
        {
            if (!this.AppInvoiceParameters.AllowEditInvoice)
            {
                MessageBox.Show("Không có quyền sửa chứng từ!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else if (this.gridControl.Rows.Count != 0)
            {
                this.SavedInvoiceOrder = this.VATInvoiceOrder;
                if (this.ActiveTransaction != "3")
                {
                    this.MasterInvoiceOrder = this.SavedInvoiceOrder;
                }
                this.NewChecked = false;
                this.OnResetStatus(false);
                this.txtNgay_Ct.Focus();
            }
        }

        protected virtual void OnLock(bool pb_Locked)
        {
            if (!this.AppInvoiceParameters.AllowLockInvoice)
            {
                MessageBox.Show("Không có quyền khóa, mở chứng từ!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            else if (this.gridControl.Rows.Count != 0)
            {
                if ((this.gridControl.SelectedRows != null) && (this.gridControl.SelectedRows.Count <= 1))
                {
                    DataRow row = ((DataRowView) this.gridControl.CurrentRow.DataBoundItem).Row;
                    if (this.CheckInvoiceLock(row["SttV"], pb_Locked))
                    {
                        this.LocalCurrentRow["Locked"] = pb_Locked;
                        row["Locked"] = pb_Locked;
                    }
                }
                else
                {
                    this.oCanNotDelete = null;
                    string str = null;
                    foreach (DataGridViewRow row2 in this.gridControl.SelectedRows)
                    {
                        DataRow row3 = ((DataRowView) row2.DataBoundItem).Row;
                        if (this.CheckInvoiceLock(row3["SttV"], pb_Locked, ref str))
                        {
                            if (this.LocalCurrentRow["SttV"].Equals(row3["SttV"]))
                            {
                                this.LocalCurrentRow["Locked"] = pb_Locked;
                                row3["Locked"] = pb_Locked;
                            }
                        }
                        else
                        {
                            this.AddNotDeleteInvoice(row3["Ngay_Ct0"], row3["So_Ct0"], str);
                        }
                    }
                    if ((this.oCanNotDelete != null) && (this.oCanNotDelete.Rows.Count > 0))
                    {
                        str = pb_Locked ? "Chứng từ không khóa được." : "Chứng từ không mở được.";
                        new FormNotDeletes(str, this.oCanNotDelete).ShowDialog();
                    }
                }
                this.SetPostedText();
            }
        }

        protected virtual void OnRefresh()
        {
            if (this.ActiveTransaction != "3")
            {
                this.oTable = this.oMethod.GetTableByType(this.ActiveTransaction);
            }
            else
            {
                this.oTable = this.oMethod.GetTableByMaster(this.MasterInvoiceOrder);
                this.Sum();
            }
            this.gridControl.DataSource = new BindingSource(this.oTable, this.oTable.TableName);
        }

        protected virtual void OnResetStatus(bool pb_Status)
        {
            this.btnRefresh.Enabled = pb_Status;
            this.btnFunctions.Enabled = pb_Status;
            this.btnHistory.Enabled = pb_Status;
            this.btnAdd.Enabled = pb_Status;
            this.btnEdit.Enabled = pb_Status;
            this.btnDelete.Enabled = pb_Status;
            this.btnClose.Enabled = pb_Status;
            this.btnSave.Enabled = !pb_Status;
            this.btnCancel.Enabled = !pb_Status;
            this.txtNgay_Ct.Enabled = !pb_Status;
            this.txtNgay_Ct0.Enabled = !pb_Status;
            this.txtSo_Ct0.ReadOnly = pb_Status;
            this.txtSo_Seri0.ReadOnly = pb_Status;
            this.txtNo_Co.ReadOnly = pb_Status;
            this.txtTk.ReadOnly = pb_Status;
            this.txtTk_Du.ReadOnly = pb_Status;
            this.txtMa_Dt.ReadOnly = pb_Status;
            this.txtTen_DtGTGT.ReadOnly = pb_Status;
            this.txtMa_DtGTGT.ReadOnly = pb_Status;
            this.txtDien_Giai.ReadOnly = pb_Status;
            this.txtGhi_Chu.ReadOnly = pb_Status;
            this.txtTien.ReadOnly = pb_Status;
            this.txtVAT_Ck.ReadOnly = pb_Status;
            this.txtThue_GTGT.ReadOnly = pb_Status;
            this.txtTien3.ReadOnly = pb_Status;
            this.txtThue_XNK.ReadOnly = pb_Status;
            this.txtHang_NLTS.ReadOnly = pb_Status;
            this.txtTSCD_Ck.ReadOnly = pb_Status;
            this.txtHoa_Don.ReadOnly = pb_Status;
            this.txtLoai_VAT.ReadOnly = pb_Status;
            this.txtDieu_Chinh.ReadOnly = pb_Status;
            this.txtMa_Sp.ReadOnly = pb_Status;
            this.gridControl.Enabled = pb_Status;
        }

        public virtual bool OnSave()
        {
            DataRow row;
            if (this.txtNgay_Ct.Value == DBNull.Value)
            {
                MessageBox.Show("Chưa nhập ngày k\x00ea khai!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (this.txtNgay_Ct0.Value == DBNull.Value)
            {
                MessageBox.Show("Chưa nhập ngày chứng từ!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (((DateTime) this.txtNgay_Ct.Value) < AppInstance.OpeningDateOfSubEnterprice)
            {
                MessageBox.Show("Ngày chứng từ phải từ ngày " + AppInstance.OpeningDateOfSubEnterprice.ToShortDateString(), AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (((DateTime) this.txtNgay_Ct.Value) <= AppInstance.EndingDateOfSubEnterprice)
            {
                MessageBox.Show("Ngày chứng từ phải từ ngày " + AppInstance.EndingDateOfSubEnterprice.AddDays(1.0).ToShortDateString(), AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (!this.NewChecked && !this.CheckInvoiceStatus(this.VATInvoiceOrder))
            {
                return false;
            }
            if (this.oMethod.NumberExisted(AppInstance.Subsidiary, this.NewChecked, this.SavedInvoiceOrder, this.txtSo_Ct0.Value, this.txtSo_Seri0.Value) && (MessageBox.Show("Số chứng từ đã tồn tại.\nC\x00f3 tiếp tục không?", AppInstance.SoftwareName, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No))
            {
                return false;
            }
            if (!AppInstance.TaxCodeValidate(this.txtMa_DtGTGT.Value))
            {
                MessageBox.Show("Mã số thuế không chính xác!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            this.LocalCurrentRow["Ngay_Ct"] = this.txtNgay_Ct.Value;
            this.LocalCurrentRow["Ngay_Ct0"] = this.txtNgay_Ct0.Value;
            this.LocalCurrentRow["So_Ct0"] = this.txtSo_Ct0.Value;
            this.LocalCurrentRow["So_Seri0"] = this.txtSo_Seri0.Value;
            this.LocalCurrentRow["No_Co"] = this.txtNo_Co.Value;
            this.LocalCurrentRow["Tk"] = this.txtTk.Value;
            this.LocalCurrentRow["Ten_Tk"] = this.txtTen_Tk.Value;
            this.LocalCurrentRow["Tk_Du"] = this.txtTk_Du.Value;
            this.LocalCurrentRow["Ten_Tk_Du"] = this.txtTen_Tk_Du.Value;
            this.LocalCurrentRow["Ma_Dt"] = this.txtMa_Dt.Value;
            this.LocalCurrentRow["Ten_Dt"] = this.txtTen_Dt.Value;
            this.LocalCurrentRow["Ten_DtGTGT"] = this.txtTen_DtGTGT.Value;
            this.LocalCurrentRow["Ma_DtGTGT"] = this.txtMa_DtGTGT.Value;
            this.LocalCurrentRow["Dien_Giai"] = this.txtDien_Giai.Value;
            this.LocalCurrentRow["Ghi_Chu"] = this.txtGhi_Chu.Value;
            this.LocalCurrentRow["Tien"] = this.txtTien.Value;
            this.LocalCurrentRow["VAT_Ck"] = this.txtVAT_Ck.Value;
            this.LocalCurrentRow["Thue_GTGT"] = this.txtThue_GTGT.Value;
            this.LocalCurrentRow["Tien3"] = this.txtTien3.Value;
            this.LocalCurrentRow["Thue_XNK"] = this.txtThue_XNK.Value;
            this.LocalCurrentRow["Hang_NLTS"] = this.txtHang_NLTS.Value;
            this.LocalCurrentRow["TSCD_Ck"] = this.txtTSCD_Ck.Value;
            this.LocalCurrentRow["Hoa_Don"] = this.txtHoa_Don.Value;
            this.LocalCurrentRow["Loai_VAT"] = this.txtLoai_VAT.Value;
            this.LocalCurrentRow["Dieu_Chinh"] = this.txtDieu_Chinh.Value;
            this.LocalCurrentRow["Ma_Sp"] = this.txtMa_Sp.Value;
            this.LocalCurrentRow["Ten_Sp"] = this.txtTen_Sp.Value;
            if (!this.oMethod.Save(this.AppInvoiceParameters.InvoiceHistory, this.NewChecked, AppInstance.Subsidiary, AppInstance.UserName, this.MasterInvoiceOrder, this.ActiveTransaction, this.LocalCurrentRow))
            {
                MessageBox.Show("Không lưu được!", AppInstance.SoftwareName, MessageBoxButtons.OK, MessageBoxIcon.Hand);
                return false;
            }
            if (this.NewChecked)
            {
                row = this.oTable.NewRow();
            }
            else
            {
                row = ((DataRowView) this.gridControl.CurrentRow.DataBoundItem).Row;
            }
            foreach (DataColumn column in row.Table.Columns)
            {
                if (this.LocalCurrentRow.Table.Columns.Contains(column.ColumnName))
                {
                    row[column.ColumnName] = this.LocalCurrentRow[column.ColumnName];
                }
            }
            row.EndEdit();
            if (this.NewChecked)
            {
                this.oTable.Rows.Add(row);
                this.OnSetPosition();
            }
            this.oTable.AcceptChanges();
            this.Sum();
            this.OnResetStatus(true);
            if (this.VATToolbarButton != null)
            {
                this.VATToolbarButton.ForeColor = this.AppInvoiceParameters.CtVAT_Status_Get(this.MasterInvoiceOrder);
            }
            return true;
        }

        private void OnSetPosition()
        {
            BindingSource dataSource = this.gridControl.DataSource as BindingSource;
            dataSource.Position = dataSource.Find("SttV", this.SavedInvoiceOrder);
        }

        public virtual void OnShow()
        {
            this.txtNgay_Ct.Value = this.LocalCurrentRow["Ngay_Ct"];
            this.txtNgay_Ct0.Value = this.LocalCurrentRow["Ngay_Ct0"];
            this.txtSo_Ct0.Value = this.LocalCurrentRow["So_Ct0"];
            this.txtSo_Seri0.Value = this.LocalCurrentRow["So_Seri0"];
            this.txtNo_Co.Value = this.LocalCurrentRow["No_Co"];
            this.txtTk.Value = this.LocalCurrentRow["Tk"];
            this.txtTen_Tk.Value = this.LocalCurrentRow["Ten_Tk"];
            this.txtTk_Du.Value = this.LocalCurrentRow["Tk_Du"];
            this.txtTen_Tk_Du.Value = this.LocalCurrentRow["Ten_Tk_Du"];
            this.txtMa_Dt.Value = this.LocalCurrentRow["Ma_Dt"];
            this.txtTen_Dt.Value = this.LocalCurrentRow["Ten_Dt"];
            this.txtTen_DtGTGT.Value = this.LocalCurrentRow["Ten_DtGTGT"];
            this.txtMa_DtGTGT.Value = this.LocalCurrentRow["Ma_DtGTGT"];
            this.txtDien_Giai.Value = this.LocalCurrentRow["Dien_Giai"];
            this.txtGhi_Chu.Value = this.LocalCurrentRow["Ghi_Chu"];
            this.txtTien.Value = this.LocalCurrentRow["Tien"];
            this.txtVAT_Ck.Value = this.LocalCurrentRow["VAT_Ck"];
            this.txtThue_GTGT.Value = this.LocalCurrentRow["Thue_GTGT"];
            this.txtTien3.Value = this.LocalCurrentRow["Tien3"];
            this.txtThue_XNK.Value = this.LocalCurrentRow["Thue_XNK"];
            this.txtHang_NLTS.Value = this.LocalCurrentRow["Hang_NLTS"];
            this.txtTSCD_Ck.Value = this.LocalCurrentRow["TSCD_Ck"];
            this.txtHoa_Don.Value = this.LocalCurrentRow["Hoa_Don"];
            this.txtLoai_VAT.Value = this.LocalCurrentRow["Loai_VAT"];
            this.txtDieu_Chinh.Value = this.LocalCurrentRow["Dieu_Chinh"];
            this.txtMa_Sp.Value = this.LocalCurrentRow["Ma_Sp"];
            this.txtTen_Sp.Value = this.LocalCurrentRow["Ten_Sp"];
            this.SetPostedText();
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
                case Keys.F8:
                    if (this.btnDelete.Enabled)
                    {
                        this.OnDelete();
                    }
                    return true;

                case (Keys.Control | Keys.Return):
                    if (((base.ActiveControl is IDataGridViewEditingControl) && (base.ActiveControl.Parent != null)) && ((base.ActiveControl.Parent.Parent != null) && (base.ActiveControl.Parent.Parent is DataGridView)))
                    {
                        (base.ActiveControl.Parent.Parent as DataGridView).EndEdit();
                    }
                    if (this.btnSave.Enabled && this.OnSave())
                    {
                        base.Close();
                    }
                    return true;

                case Keys.F2:
                    if (this.btnAdd.Enabled)
                    {
                        this.NewChecked = true;
                        this.OnAdd();
                    }
                    return true;

                case Keys.F3:
                    if (!this.btnEdit.Enabled)
                    {
                        if (this.btnSave.Enabled)
                        {
                            if (((base.ActiveControl is IDataGridViewEditingControl) && (base.ActiveControl.Parent != null)) && ((base.ActiveControl.Parent.Parent != null) && (base.ActiveControl.Parent.Parent is DataGridView)))
                            {
                                (base.ActiveControl.Parent.Parent as DataGridView).EndEdit();
                            }
                            this.OnSave();
                        }
                        break;
                    }
                    this.OnEdit();
                    break;

                case Keys.Escape:
                    if (this.btnClose.Enabled)
                    {
                        base.Close();
                    }
                    else if (this.btnCancel.Enabled)
                    {
                        this.OnCancel();
                    }
                    return true;

                default:
                    return base.ProcessCmdKey(ref msg, keyData);
            }
            return true;
        }

        private void SetPostedText()
        {
            if (this.LocalCurrentRow.Table.Columns.Contains("Locked"))
            {
                this.txtLocked.Value = ((bool) this.LocalCurrentRow["Locked"]) ? "Khóa" : "Mở";
            }
        }

        private void Sum()
        {
            if (this.ActiveTransaction == "3")
            {
                decimal num = 0M;
                decimal num2 = 0M;
                foreach (DataRow row in this.oTable.Rows)
                {
                    if (row.RowState != DataRowState.Deleted)
                    {
                        if (row["Tien3"] != DBNull.Value)
                        {
                            num += (decimal) row["Tien3"];
                        }
                        if (row["Tien"] != DBNull.Value)
                        {
                            num2 += (decimal) row["Tien"];
                        }
                    }
                }
                this.TTien_VAT1 = num;
                this.TTien1 = num2;
                this.txtTTien_VAT1.Value = num;
            }
        }

        private void txtMa_Dt_Validated(object sender, EventArgs e)
        {
            if (this.txtMa_Dt.ValueChanged)
            {
                this.txtTen_DtGTGT.Value = this.txtMa_Dt.GetFieldData("Ten_Dt");
                this.txtMa_DtGTGT.Value = this.txtMa_Dt.GetFieldData("Ms_Thue");
            }
        }

        private void txtThue_GTGT_Validated(object sender, EventArgs e)
        {
            if (this.txtThue_GTGT.ValueChanged)
            {
                this.Calculate();
            }
        }

        private void txtTien_Validated(object sender, EventArgs e)
        {
            if (this.txtTien.ValueChanged)
            {
                this.Calculate();
            }
        }

        private void txtTien3_Validated(object sender, EventArgs e)
        {
            if (this.txtTien3.ValueChanged)
            {
                this.Calculate();
            }
        }

        private void txtVAT_Ck_Validated(object sender, EventArgs e)
        {
            if (this.txtVAT_Ck.ValueChanged)
            {
                this.Calculate();
            }
        }

        private string ActiveTransaction
        {
            get
            {
                return this.is_ActiveTransaction;
            }
            set
            {
                if (this.is_ActiveTransaction != value)
                {
                    this.is_ActiveTransaction = value;
                }
            }
        }

        private object Dien_Giai
        {
            get
            {
                return this.is_Dien_Giai;
            }
            set
            {
                this.is_Dien_Giai = value;
            }
        }

        [Category("VAT properties"), DefaultValue((string) null), Browsable(false), Description("The parameters that declare by system, user, invoice code.")]
        public AppInvoiceLib AppInvoiceParameters
        {
            get
            {
                if (this.oAppInvoiceLib == null)
                {
                    this.AppInvoiceParameters = new AppInvoiceLib();
                }
                return this.oAppInvoiceLib;
            }
            set
            {
                this.oAppInvoiceLib = value;
            }
        }

        [DefaultValue(""), Browsable(false), Category("VAT properties"), Description("The current invoice code to edit or add.")]
        public string InvoiceCode
        {
            get
            {
                if (this.AppInvoiceParameters == null)
                {
                    return "";
                }
                return this.AppInvoiceParameters.InvoiceCode;
            }
            set
            {
                if (this.AppInvoiceParameters != null)
                {
                    this.AppInvoiceParameters.InvoiceCode = value;
                    if (!string.IsNullOrEmpty(this.AppInvoiceParameters.InvoiceCode))
                    {
                        this.Text = this.AppInvoiceParameters.InvoiceName;
                    }
                }
            }
        }

        [Browsable(false)]
        public DataRow LocalCurrentRow
        {
            get
            {
                if (this.oCurrentRow == null)
                {
                    this.is_VATInvoiceOrder = "AppSOFT2009";
                    this.oCurrentRow = this.oMethod.GetDataRow(this.is_VATInvoiceOrder);
                }
                return this.oCurrentRow;
            }
            set
            {
                this.oCurrentRow = value;
                if ((this.oCurrentRow != null) && (this.oCurrentRow.RowState == DataRowState.Unchanged))
                {
                    this.OnShow();
                }
            }
        }

        private object Ma_Dt
        {
            get
            {
                return this.is_Ma_Dt;
            }
            set
            {
                this.is_Ma_Dt = value;
            }
        }

        private object Ma_DtGTGT
        {
            get
            {
                return this.is_Ma_DtGTGT;
            }
            set
            {
                this.is_Ma_DtGTGT = value;
            }
        }

        [Description("The current invoice order to edit or add."), Browsable(false), DefaultValue(""), Category("VAT properties")]
        public string MasterInvoiceOrder
        {
            get
            {
                return this.is_MasterInvoiceOrder;
            }
            set
            {
                if ((this.is_MasterInvoiceOrder != value) && !string.IsNullOrEmpty(value))
                {
                    this.is_MasterInvoiceOrder = value;
                }
            }
        }

        [Browsable(false)]
        public bool NewChecked
        {
            get
            {
                return this.ib_NewChecked;
            }
            set
            {
                this.ib_NewChecked = value;
            }
        }

        private object Ngay_Ct
        {
            get
            {
                if (this.id_Ngay_Ct == DBNull.Value)
                {
                    return DateTime.Today;
                }
                return this.id_Ngay_Ct;
            }
            set
            {
                if (this.id_Ngay_Ct != value)
                {
                    this.id_Ngay_Ct = value;
                }
            }
        }

        private object Ngay_Ct0
        {
            get
            {
                if (this.id_Ngay_Ct0 == DBNull.Value)
                {
                    return DateTime.Today;
                }
                return this.id_Ngay_Ct0;
            }
            set
            {
                if (this.id_Ngay_Ct0 != value)
                {
                    this.id_Ngay_Ct0 = value;
                }
            }
        }

        private object No_Co
        {
            get
            {
                return this.is_No_Co;
            }
            set
            {
                this.is_No_Co = value;
            }
        }

        private int Posted
        {
            get
            {
                if (this.ii_Posted == -1)
                {
                    return 1;
                }
                return this.ii_Posted;
            }
            set
            {
                if (this.ii_Posted != value)
                {
                    this.ii_Posted = value;
                }
            }
        }

        [Description("The current invoice order to edit or add."), DefaultValue(""), Category("VAT properties"), Browsable(false)]
        private string SavedInvoiceOrder
        {
            get
            {
                return this.is_SavedInvoiceOrder;
            }
            set
            {
                if (this.is_SavedInvoiceOrder != value)
                {
                    this.is_SavedInvoiceOrder = value;
                }
            }
        }

        private object So_Ct
        {
            get
            {
                return this.is_So_Ct;
            }
            set
            {
                this.is_So_Ct = value;
            }
        }

        private object So_Ct0
        {
            get
            {
                return this.is_So_Ct0;
            }
            set
            {
                this.is_So_Ct0 = value;
            }
        }

        private object So_Seri0
        {
            get
            {
                return this.is_So_Seri0;
            }
            set
            {
                this.is_So_Seri0 = value;
            }
        }

        private object Ten_DtGTGT
        {
            get
            {
                return this.is_Ten_DtGTGT;
            }
            set
            {
                this.is_Ten_DtGTGT = value;
            }
        }

        private decimal Thue_Suat
        {
            get
            {
                return this.ii_Thue_Suat;
            }
            set
            {
                this.ii_Thue_Suat = value;
            }
        }

        private object Thue_XNK
        {
            get
            {
                if (this.is_Thue_XNK == DBNull.Value)
                {
                    return "K";
                }
                return this.is_Thue_XNK;
            }
            set
            {
                this.is_Thue_XNK = value;
            }
        }

        private object Tk
        {
            get
            {
                return this.is_Tk;
            }
            set
            {
                this.is_Tk = value;
            }
        }

        private object Tk_Du
        {
            get
            {
                return this.is_Tk_Du;
            }
            set
            {
                this.is_Tk_Du = value;
            }
        }

        private decimal TTien
        {
            get
            {
                return this.ii_TTien;
            }
            set
            {
                this.ii_TTien = value;
            }
        }

        private decimal TTien_VAT0
        {
            get
            {
                return this.ii_TTien_VAT0;
            }
            set
            {
                this.ii_TTien_VAT0 = value;
            }
        }

        private decimal TTien_VAT1
        {
            get
            {
                return this.ii_TTien_VAT1;
            }
            set
            {
                this.ii_TTien_VAT1 = value;
            }
        }

        private decimal TTien1
        {
            get
            {
                return this.ii_TTien1;
            }
            set
            {
                this.ii_TTien1 = value;
            }
        }

        [Category("VAT properties"), Browsable(false), Description("The current invoice order to edit or add."), DefaultValue("")]
        private string VATInvoiceOrder
        {
            get
            {
                return this.is_VATInvoiceOrder;
            }
            set
            {
                if (this.is_VATInvoiceOrder != value)
                {
                    this.is_VATInvoiceOrder = value;
                    this.OnAchieve();
                }
            }
        }

        [Browsable(false)]
        public ToolStripButton VATToolbarButton
        {
            get
            {
                return this.oVATToolbarButton;
            }
            set
            {
                this.oVATToolbarButton = value;
            }
        }
    }
}

